Philipp Hörist pushed to branch master at gajim / gajim

Commits:

1 changed file:

Changes:

  • gajim/common/modules/software_version.py
    ... ... @@ -32,15 +32,13 @@ def __init__(self, con):
    32 32
             BaseModule.__init__(self, con)
    
    33 33
     
    
    34 34
         def set_enabled(self, enabled):
    
    35
    -        if not enabled:
    
    36
    -            self._nbxmpp('SoftwareVersion').disable()
    
    37
    -            return
    
    38
    -
    
    39
    -        if not app.settings.get_account_setting(self._account, 'send_os_info'):
    
    40
    -            return
    
    41
    -
    
    35
    +        if enabled and app.settings.get_account_setting(self._account,
    
    36
    +                                                        'send_os_info'):
    
    37
    +            os_info = get_os_info()
    
    38
    +        else:
    
    39
    +            os_info = None
    
    42 40
             self._nbxmpp('SoftwareVersion').set_software_version(
    
    43
    -            'Gajim', app.version, get_os_info())
    
    41
    +            'Gajim', app.version, os_info)
    
    44 42
             self._nbxmpp('SoftwareVersion').set_allow_reply_func(self._allow_reply)
    
    45 43
     
    
    46 44
         def _allow_reply(self, jid):