Struct Callbacks for blist_cb. (UPDATE)
[python-purple] / conversation_cbs.pxd
index 8e68883..4f8852a 100644 (file)
@@ -30,7 +30,7 @@ cdef void create_conversation (conversation.PurpleConversation *conv):
     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
                          "create_conversation\n")
     try:
     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
                          "create_conversation\n")
     try:
-        (<object>conversation_cbs["create_conversation"])("create_conversation")
+        (<object>conversation_cbs["create_conversation"])(conv.name, conv.type)
     except KeyError:
         pass
 
     except KeyError:
         pass
 
@@ -56,8 +56,12 @@ cdef void write_im (conversation.PurpleConversation *conv, const_char *who,
                     const_char *message, conversation.PurpleMessageFlags flags,
                     time_t mtime):
     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_im\n")
                     const_char *message, conversation.PurpleMessageFlags flags,
                     time_t mtime):
     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_im\n")
+    if who:
+        sender = <char *> who
+    else:
+        sender = None
     try:
     try:
-        (<object>conversation_cbs["write_im"])(conv.account.username, <char *> message)
+        (<object>conversation_cbs["write_im"])(conv.account.username, sender, <char *> message)
     except KeyError:
         pass
 
     except KeyError:
         pass