Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim

Commits:

2 changed files:

Changes:

  • src/common/commands.py
    ... ... @@ -345,9 +345,10 @@ class ConnectionCommands:
    345 345
         def __init__(self):
    
    346 346
             # a list of all commands exposed: node -> command class
    
    347 347
             self.__commands = {}
    
    348
    -        for cmdobj in (ChangeStatusCommand, ForwardMessagesCommand,
    
    349
    -        LeaveGroupchatsCommand, FwdMsgThenDisconnectCommand):
    
    350
    -            self.__commands[cmdobj.commandnode] = cmdobj
    
    348
    +        if gajim.config.get('remote_commands'):
    
    349
    +            for cmdobj in (ChangeStatusCommand, ForwardMessagesCommand,
    
    350
    +            LeaveGroupchatsCommand, FwdMsgThenDisconnectCommand):
    
    351
    +                self.__commands[cmdobj.commandnode] = cmdobj
    
    351 352
     
    
    352 353
             # a list of sessions; keys are tuples (jid, sessionid, node)
    
    353 354
             self.__sessions = {}
    

  • src/common/config.py
    ... ... @@ -315,6 +315,7 @@ class Config:
    315 315
                 'remember_opened_chat_controls': [ opt_bool, True, _('If enabled, Gajim will reopen chat windows that were opened last time Gajim was closed.')],
    
    316 316
                 'positive_184_ack': [ opt_bool, False, _('If enabled, Gajim will show an icon to show that sent message has been received by your contact')],
    
    317 317
                 'pgp_encoding': [ opt_str, '', _('Sets the encoding used by python-gnupg'), True],
    
    318
    +            'remote_commands': [opt_bool, False, _('If True, Gajim will execute XEP-0146 Commands.')],
    
    318 319
         }, {})
    
    319 320
     
    
    320 321
         __options_per_key = {