diff libervia.py @ 138:008fa8d36602

browser side: our own microblogs are now requested once logged
author Goffi <goffi@goffi.org>
date Sun, 28 Oct 2012 18:24:18 +0100
parents b145da69a218
children b6658f3ac8a0
line wrap: on
line diff
--- a/libervia.py	Mon Oct 22 00:08:41 2012 +0200
+++ b/libervia.py	Sun Oct 28 18:24:18 2012 +0100
@@ -207,13 +207,6 @@
         self.bridge_signals.call('getSignals', self._getSignalsCB)
         #We want to know our own jid
         self.bridge.call('getProfileJid', self._getProfileJidCB)
-        #we fill the panels already here
-        for lib_wid in self.libervia_widgets:
-            if isinstance(lib_wid, panels.MicroblogPanel):
-                if lib_wid.accept_all():
-                    self.bridge.call('getMassiveLastMblogs', lib_wid.massiveInsert, 'ALL', [], 10)
-                else:
-                    self.bridge.call('getMassiveLastMblogs', lib_wid.massiveInsert, 'GROUP', lib_wid.accepted_groups, 10)
         
 
     def _getContactsCB(self, contacts_data):
@@ -276,6 +269,15 @@
         self.bridge.call('getRoomsJoined', self._getRoomsJoinedCb)
         #and if there is any subscription request waiting for us
         self.bridge.call('getWaitingSub', self._getWaitingSubCb)
+        #we fill the panels already here
+        for lib_wid in self.libervia_widgets:
+            if isinstance(lib_wid, panels.MicroblogPanel):
+                if lib_wid.accept_all():
+                    self.bridge.call('getMassiveLastMblogs', lib_wid.massiveInsert, 'ALL', [], 10)
+                else:
+                    self.bridge.call('getMassiveLastMblogs', lib_wid.massiveInsert, 'GROUP', lib_wid.accepted_groups, 10)
+                #FIXME: we currently get all post and filter after for each widget, need to be optimised
+                self.bridge.call('getMassiveLastMblogs', lib_wid.massiveInsert, 'JID', [jid], 10)
 
     ## Signals callbacks ##