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

Commits:

1 changed file:

Changes:

  • gajim/common/modules/mam.py
    ... ... @@ -464,12 +464,16 @@ def request_archive_on_muc_join(self, jid: JID):
    464 464
             if threshold == SyncThreshold.NO_SYNC:
    
    465 465
                 return
    
    466 466
     
    
    467
    +        contact = self._get_contact(jid, groupchat=True)
    
    468
    +        contact.notify('mam-sync-started')
    
    469
    +
    
    467 470
             mam_id, start_date = self._get_muc_query_params(jid, threshold)
    
    468 471
     
    
    469 472
             result = yield self._execute_query(jid, mam_id, start_date)
    
    470 473
             if is_error(result):
    
    471 474
                 if result.condition != 'item-not-found':
    
    472 475
                     self._log.warning(result)
    
    476
    +                contact.notify('mam-sync-error', result.get_text())
    
    473 477
                     return
    
    474 478
     
    
    475 479
                 app.storage.archive.reset_archive_infos(result.jid)
    
    ... ... @@ -477,6 +481,7 @@ def request_archive_on_muc_join(self, jid: JID):
    477 481
                 result = yield self._execute_query(result.jid, None, start_date)
    
    478 482
                 if is_error(result):
    
    479 483
                     self._log.warning(result)
    
    484
    +                contact.notify('mam-sync-error', result.get_text())
    
    480 485
                     return
    
    481 486
     
    
    482 487
             if result.rsm.last is not None:
    
    ... ... @@ -488,6 +493,8 @@ def request_archive_on_muc_join(self, jid: JID):
    488 493
                     last_mam_id=result.rsm.last,
    
    489 494
                     last_muc_timestamp=time.time())
    
    490 495
     
    
    496
    +        contact.notify('mam-sync-finished')
    
    497
    +
    
    491 498
         @as_task
    
    492 499
         def _execute_query(self,
    
    493 500
                            jid: JID,