diff frontends/quick_frontend/quick_app.py @ 78:ace2af8abc5a

Added method to know which MUC are joined, and which subjects were received. - plugin xep-0045: new methods getRoomJoined and getRoomSubjects - wix: room joined are openned and subjects are set on profile plug
author Goffi <goffi@goffi.org>
date Wed, 31 Mar 2010 17:16:27 +1100
parents 8becde8a967c
children db0a0f000e37
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_app.py	Tue Mar 30 16:08:44 2010 +1100
+++ b/frontends/quick_frontend/quick_app.py	Wed Mar 31 17:16:27 2010 +1100
@@ -104,10 +104,18 @@
                 statuses = presences[contact][res][2]
                 self.presenceUpdate(jabber_id, show, priority, statuses, profile)
 
+        #The waiting subscription requests
         waitingSub = self.bridge.getWaitingSub(profile)
         for sub in waitingSub:
             self.subscribe(waitingSub[sub], sub, profile)
 
+        #Now we open the MUC window when we already are:
+        for room_args in self.bridge.getRoomJoined(profile):
+            self.roomJoined(*room_args, profile=profile)
+
+        for subject_args in self.bridge.getRoomSubjects(profile):
+            self.roomNewSubject(*subject_args, profile=profile)
+
     def unplug_profile(self, profile):
         """Tell the application to not follow anymore the profile"""
         if not profile in self.profiles: