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

Commits:

2 changed files:

Changes:

  • gajim/common/modules/mam.py
    ... ... @@ -341,11 +341,17 @@ def request_archive_on_signin(self):
    341 341
             mam_id, start_date = self._get_query_params()
    
    342 342
     
    
    343 343
             result = yield self._execute_query(own_jid, mam_id, start_date)
    
    344
    -        if is_error(result) and result.condition == 'item-not-found':
    
    344
    +        if is_error(result):
    
    345
    +            if result.condition != 'item-not-found':
    
    346
    +                self._log.warning(result)
    
    347
    +                return
    
    348
    +
    
    345 349
                 app.storage.archive.reset_archive_infos(result.jid)
    
    346 350
                 _, start_date = self._get_query_params()
    
    347 351
                 result = yield self._execute_query(result.jid, None, start_date)
    
    348
    -            raise_if_error(result)
    
    352
    +            if is_error(result):
    
    353
    +                self._log.warning(result)
    
    354
    +                return
    
    349 355
     
    
    350 356
             if result.rsm.last is not None:
    
    351 357
                 # <last> is not provided if the requested page was empty
    
    ... ... @@ -386,11 +392,17 @@ def request_archive_on_muc_join(self, jid):
    386 392
             mam_id, start_date = self._get_muc_query_params(jid, threshold)
    
    387 393
     
    
    388 394
             result = yield self._execute_query(jid, mam_id, start_date)
    
    389
    -        if is_error(result) and result.condition == 'item-not-found':
    
    395
    +        if is_error(result):
    
    396
    +            if result.condition != 'item-not-found':
    
    397
    +                self._log.warning(result)
    
    398
    +                return
    
    399
    +
    
    390 400
                 app.storage.archive.reset_archive_infos(result.jid)
    
    391 401
                 _, start_date = self._get_muc_query_params(jid, threshold)
    
    392 402
                 result = yield self._execute_query(result.jid, None, start_date)
    
    393
    -            raise_if_error(result)
    
    403
    +            if is_error(result):
    
    404
    +                self._log.warning(result)
    
    405
    +                return
    
    394 406
     
    
    395 407
             if result.rsm.last is not None:
    
    396 408
                 # <last> is not provided if the requested page was empty
    

  • gajim/groupchat_control.py
    ... ... @@ -1095,7 +1095,7 @@ def is_connected(self, value: bool) -> None:
    1095 1095
         def got_connected(self):
    
    1096 1096
             self.roster.initial_draw()
    
    1097 1097
     
    
    1098
    -        if self.disco_info.has_mam:
    
    1098
    +        if self.disco_info.has_mam_2:
    
    1099 1099
                 # Request MAM
    
    1100 1100
                 con = app.connections[self.account]
    
    1101 1101
                 con.get_module('MAM').request_archive_on_muc_join(