summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-08-06 15:38:09 +0200
committermathieui <mathieui@mathieui.net>2012-08-06 15:38:09 +0200
commit7a485ef4d0d74313bff8c9c7b2ee2dcb5c4a75e9 (patch)
tree293d3c01239572dd3a9743422c79f8c0dfdc0a1c /src/windows.py
parenta14141bcec98eee77937716113ecd8a994c4836b (diff)
downloadpoezio-7a485ef4d0d74313bff8c9c7b2ee2dcb5c4a75e9.tar.gz
poezio-7a485ef4d0d74313bff8c9c7b2ee2dcb5c4a75e9.tar.bz2
poezio-7a485ef4d0d74313bff8c9c7b2ee2dcb5c4a75e9.tar.xz
poezio-7a485ef4d0d74313bff8c9c7b2ee2dcb5c4a75e9.zip
Add a common.safeJID function, and use it everywhere
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/windows.py b/src/windows.py
index c2a77411..6e1fd9ec 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -29,6 +29,7 @@ from roster import RosterGroup
from poopt import cut_text
from sleekxmpp import JID
+from common import safeJID
import core
import wcwidth
@@ -431,7 +432,7 @@ class PrivateInfoWin(InfoWin):
self._refresh()
def write_room_name(self, name):
- jid = JID(name)
+ jid = safeJID(name)
room_name, nick = jid.bare, jid.resource
self.addstr(nick, to_curses_attr(get_theme().COLOR_PRIVATE_NAME))
txt = ' from room %s' % room_name
@@ -464,7 +465,7 @@ class ConversationInfoWin(InfoWin):
# from someone not in our roster. In this case, we display
# only the maximum information from the message we can get.
log.debug('Refresh: %s',self.__class__.__name__)
- jid = JID(jid)
+ jid = safeJID(jid)
if contact:
if jid.resource:
resource = contact[jid.full]
@@ -539,7 +540,7 @@ class ConversationStatusMessageWin(InfoWin):
def refresh(self, jid, contact):
log.debug('Refresh: %s',self.__class__.__name__)
- jid = JID(jid)
+ jid = safeJID(jid)
if contact:
if jid.resource:
resource = contact[jid.full]