Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Collett <morgan.collett@gmail.com>2008-07-30 13:24:30 (GMT)
committer Morgan Collett <morgan.collett@gmail.com>2008-07-30 13:24:30 (GMT)
commit96c2503f24a08ee9db45ae7c19b0e915be5d341d (patch)
treec9d66f42ccffe5a54db33e74c8db47fa1deb591f
parentb35ce053313ed3416db2ab484842167e0e25d85b (diff)
#7717: Log incoming messages
-rw-r--r--NEWS1
-rw-r--r--pippy_app.py11
2 files changed, 11 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index e6ac619..262c92e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+* #7717: Log incoming messages (morgs)
* #7692: Don't show pending messages when joining a chat (morgs)
* Updated translations: nl, te, es
diff --git a/pippy_app.py b/pippy_app.py
index 54f8947..7fd1ce3 100644
--- a/pippy_app.py
+++ b/pippy_app.py
@@ -100,7 +100,7 @@ class Chat(ViewSourceActivity):
return
bus_name, connection, channel = simplejson.loads(tp_channel)
logger.debug('GOT XMPP: %s %s %s', bus_name, connection,
- channel) # XXX
+ channel)
conn = Connection(
bus_name, connection, ready_handler=lambda conn: \
self._one_to_one_connection_ready_cb(bus_name, channel, conn))
@@ -142,6 +142,14 @@ class Chat(ViewSourceActivity):
def _received_cb(self, buddy, text):
"""Show message that was received."""
+ if buddy:
+ if type(buddy) is dict:
+ nick = buddy['nick']
+ else:
+ nick = buddy.props.nick
+ else:
+ nick = '???'
+ logger.debug('Received message from %s: %s', nick, text)
self.add_text(buddy, text)
def _alert(self, title, text=None):
@@ -665,6 +673,7 @@ CHAT_ICON=\
"""
CHAT_NEWS="""
+* #7717: Log incoming messages (morgs)
* #7692: Don't show pending messages when joining a chat (morgs)
* Updated translations: nl, te, es