mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-30 00:59:36 +00:00
core: add commands that will not be forwarded to connected mobile (#3398)
* core: add commands that will not be forwarded to connected mobile * fail if command that must be executed locally sent to remote host
This commit is contained in:
+3
-1
@@ -400,7 +400,9 @@ execChatCommand rh s = do
|
||||
case parseChatCommand s of
|
||||
Left e -> pure $ chatCmdError u e
|
||||
Right cmd -> case rh of
|
||||
Just remoteHostId | allowRemoteCommand cmd -> execRemoteCommand u remoteHostId cmd s
|
||||
Just rhId
|
||||
| allowRemoteCommand cmd -> execRemoteCommand u rhId cmd s
|
||||
| otherwise -> pure $ CRChatCmdError u $ ChatErrorRemoteHost (RHId rhId) $ RHELocalCommand
|
||||
_ -> execChatCommand_ u cmd
|
||||
|
||||
execChatCommand' :: ChatMonad' m => ChatCommand -> m ChatResponse
|
||||
|
||||
Reference in New Issue
Block a user