diff --git a/CHANGELOG b/CHANGELOG index 19624ffb..be3146eb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ For more detailed changelog, see the roadmap: http://codingteam.net/project/poezio/roadmap * Poezio 0.6 - dev +- Private messages are handled - Muc error messages are displayed - Nickname auto-completion - Users status are displayed in the MUC user-list @@ -18,6 +19,10 @@ http://codingteam.net/project/poezio/roadmap - The dates of room history are handled - The way the text is displayed on the screen has been rewritten, this fixes the blink and the slowness-over-ssh problems. +- User lists are ordered +- Messages can be logged in files +- Status changes displays only what has really changed +- Users can be ignored (/ignore, /unignore) - Various Bugfixes * Poezio 0.5.1 - 2 Feb 2010 diff --git a/src/connection.py b/src/connection.py index 5c94b3fa..e20aaab5 100644 --- a/src/connection.py +++ b/src/connection.py @@ -173,7 +173,10 @@ class Connection(threading.Thread): if message.getType() == 'error': self.error_message(message) return - self.handler.emit('room-message', stanza=message) + if message.getType() == 'groupchat': + self.handler.emit('room-message', stanza=message) + else: + self.handler.emit('private-message', stanza=message) raise xmpp.protocol.NodeProcessed def process(self, timeout=10): @@ -213,3 +216,10 @@ def jid_get_domain(jid): if isinstance(jid, basestring): jid = xmpp.JID(jid) return jid.getDomain() + +def is_jid_the_same(a, b): + if isinstance(a, basestring): + a = xmpp.JID(a) + if isinstance(b, basestring): + b = xmpp.JID(b) + return a.bareMatch(b) diff --git a/src/gui.py b/src/gui.py index 685bcb97..b127abb5 100644 --- a/src/gui.py +++ b/src/gui.py @@ -40,6 +40,8 @@ from user import User from room import Room from message import Message +from connection import is_jid_the_same + from common import debug def doupdate(): debug("doupdate") @@ -83,6 +85,8 @@ class Gui(object): 'set': (self.command_set, _("Usage: /set