diff src/browser/sat_browser/contact_widget.py @ 909:e8b133b77aa4

browser, server: update to get compatibility with 0.7-dev (not finished): Q&D update to restore compatibility - version changed to 0.7D - contact list has been modified to be compatible with changes, but it doesn't take profit of improvment yet - messageSend partially work, there is a disconnection and an error in console logs when sending a message - message are not received yet
author Goffi <goffi@goffi.org>
date Tue, 09 Aug 2016 01:07:15 +0200
parents f8a7a046ff9c
children fd4eae654182
line wrap: on
line diff
--- a/src/browser/sat_browser/contact_widget.py	Wed Jul 13 22:45:54 2016 +0200
+++ b/src/browser/sat_browser/contact_widget.py	Tue Aug 09 01:07:15 2016 +0200
@@ -31,7 +31,6 @@
 import html_tools
 import base_widget
 import libervia_widget
-import contact_list
 
 unicode = str # XXX: pyjama doesn't manage unicode
 
@@ -57,7 +56,8 @@
 
     def update(self):
         clist = self.host.contact_list
-        alerts_count = clist.getAlerts(self.jid, use_bare_jid=not self.jid.resource)
+        notifs = list(self.host.getNotifs(self.jid, exact_jid=False, profile=C.PROF_KEY_NONE))
+        alerts_count = len(notifs)
         alert_html = ("<strong>(%i)</strong>&nbsp;" % alerts_count) if alerts_count else ""
 
         contact_raw = None