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

Commits:

2 changed files:

Changes:

  • gajim/common/connection.py
    ... ... @@ -191,6 +191,7 @@ class CommonConnection:
    191 191
                         'hostname': socket.gethostname(),
    
    192 192
                         'rand': rand
    
    193 193
                 })
    
    194
    +            app.config.set_per('accounts', self.name, 'resource', resource)
    
    194 195
             return resource
    
    195 196
     
    
    196 197
         def dispatch(self, event, data):
    

  • gajim/gui_interface.py
    ... ... @@ -1162,10 +1162,18 @@ class Interface:
    1162 1162
             account = obj.conn.name
    
    1163 1163
             conn = obj.conn
    
    1164 1164
             self.roster.send_status(account, 'offline', conn.status)
    
    1165
    +
    
    1165 1166
             def on_ok(new_resource):
    
    1166 1167
                 app.config.set_per('accounts', account, 'resource', new_resource)
    
    1167 1168
                 self.roster.send_status(account, conn.old_show, conn.status)
    
    1169
    +
    
    1168 1170
             proposed_resource = conn.server_resource
    
    1171
    +        if proposed_resource.startswith('gajim.'):
    
    1172
    +            # Dont notify the user about resource change if he didnt set
    
    1173
    +            # a custom resource
    
    1174
    +            on_ok('gajim.$rand')
    
    1175
    +            return
    
    1176
    +
    
    1169 1177
             proposed_resource += app.config.get('gc_proposed_nick_char')
    
    1170 1178
             dlg = dialogs.ResourceConflictDialog(_('Resource Conflict'),
    
    1171 1179
                 _('You are already connected to this account with the same '