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


Commits:
36805577 by Philipp Hörist at 2019-08-06T20:32:11Z
MAM: Minor code simplification

- - - - -
6b789e16 by Philipp Hörist at 2019-08-07T16:11:25Z
Groupchat: Update roster status icon on join/leave

- - - - -


2 changed files:

- gajim/common/modules/mam.py
- gajim/groupchat_control.py


Changes:

=====================================
gajim/common/modules/mam.py
=====================================
@@ -123,7 +123,7 @@ class MAM(BaseModule):
 
         else:
             archive_jid = self._con.get_own_jid().getBare()
-            namespace = self._con.get_module('MAM').archiving_namespace
+            namespace = self.archiving_namespace
             timestamp = None
 
         if properties.stanza_id is None or namespace != nbxmpp.NS_MAM_2:
@@ -132,8 +132,7 @@ class MAM(BaseModule):
         if not archive_jid == properties.stanza_id.by:
             return
 
-        if not self._con.get_module('MAM').is_catch_up_finished(
-                archive_jid):
+        if not self.is_catch_up_finished(archive_jid):
             return
 
         app.logger.set_archive_infos(archive_jid,


=====================================
gajim/groupchat_control.py
=====================================
@@ -1496,6 +1496,9 @@ class GroupchatControl(ChatControlBase):
         if self.parent_win:
             self.parent_win.redraw_tab(self)
 
+        # Update Roster
+        app.interface.roster.draw_contact(self.room_jid, self.account)
+
         formattings_button = self.xml.get_object('formattings_button')
         formattings_button.set_sensitive(True)
 
@@ -1524,10 +1527,8 @@ class GroupchatControl(ChatControlBase):
         con = app.connections[self.account]
         con.get_module('Chatstate').remove_delay_timeout(self.contact)
 
-        contact = app.contacts.get_groupchat_contact(self.account,
-                                                     self.room_jid)
-        if contact is not None:
-            app.interface.roster.draw_contact(self.room_jid, self.account)
+        # Update Roster
+        app.interface.roster.draw_contact(self.room_jid, self.account)
 
         # We don't redraw the whole banner here, because only icon change
         self._update_banner_state_image()



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/a6b4d993bd9b08b2686165bec72678b727d7e727...6b789e162d88fe8d5cd4298cb39465e2f0d8001c

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/a6b4d993bd9b08b2686165bec72678b727d7e727...6b789e162d88fe8d5cd4298cb39465e2f0d8001c
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to