comparison 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
comparison
equal deleted inserted replaced
77:1ae680f9682e 78:ace2af8abc5a
102 show = presences[contact][res][0] 102 show = presences[contact][res][0]
103 priority = presences[contact][res][1] 103 priority = presences[contact][res][1]
104 statuses = presences[contact][res][2] 104 statuses = presences[contact][res][2]
105 self.presenceUpdate(jabber_id, show, priority, statuses, profile) 105 self.presenceUpdate(jabber_id, show, priority, statuses, profile)
106 106
107 #The waiting subscription requests
107 waitingSub = self.bridge.getWaitingSub(profile) 108 waitingSub = self.bridge.getWaitingSub(profile)
108 for sub in waitingSub: 109 for sub in waitingSub:
109 self.subscribe(waitingSub[sub], sub, profile) 110 self.subscribe(waitingSub[sub], sub, profile)
111
112 #Now we open the MUC window when we already are:
113 for room_args in self.bridge.getRoomJoined(profile):
114 self.roomJoined(*room_args, profile=profile)
115
116 for subject_args in self.bridge.getRoomSubjects(profile):
117 self.roomNewSubject(*subject_args, profile=profile)
110 118
111 def unplug_profile(self, profile): 119 def unplug_profile(self, profile):
112 """Tell the application to not follow anymore the profile""" 120 """Tell the application to not follow anymore the profile"""
113 if not profile in self.profiles: 121 if not profile in self.profiles:
114 warning (_("This profile is not plugged")) 122 warning (_("This profile is not plugged"))