Messages from iChat are silently ignored
@wjt
Submitted by Will Thompson Assigned to Telepathy bugs list
Description
Messages from iChat are completely ignored by Salut. I suspect this is because they have no from='' attribute. In the following log, 'wjt@queeg' is using Salut, and 'wjt@bael' is using iChat.
First I send a message from Salut to iChat, and it comes out at the other end just fine:
(telepathy-salut:31900): wocky-DEBUG: _write_node_tree: Serializing tree:
- message xmlns='jabber:client' from='wjt@queeg' to='wjt@bael' type='chat'
- body "Here is a message from Salut to iChat"
- html xmlns='http://jabber.org/protocol/xhtml-im'
- body xmlns='http://www.w3.org/1999/xhtml'
"Here is a message from Salut to iChat"
(telepathy-salut:31900): wocky-DEBUG: Writing xml:
<body>
Here is a message from Salut to iChat</body>
Here is a message from Salut to iChat</body>``</html>``</message>
- body xmlns='http://www.w3.org/1999/xhtml'
"Here is a message from Salut to iChat"
(telepathy-salut:31900): wocky-DEBUG: Writing xml:
I start typing in iChat, and no notification appears:
(telepathy-salut:31900): wocky-DEBUG: Parsing chunk: <body>
</body>
(telepathy-salut:31900): wocky-DEBUG: _end_element_ns: Received stanza
- message xmlns='jabber:client' to='wjt@queeg' "
" * body " " * html xmlns='http://jabber.org/protocol/xhtml-im' * body xmlns='http://www.w3.org/1999/xhtml' style='background-color:#fc86ca;color:#000000;' " " * x xmlns='jabber:x:event' " " * composing * id * composing xmlns='http://jabber.org/protocol/chatstates' (telepathy-salut:31900): wocky-DEBUG: handle_stanza: wocky-c2s-porter.c:1023: Stanza not handled
And then I hit enter in iChat. The message doesn't show up in Empathy:
(telepathy-salut:31900): wocky-DEBUG: Parsing chunk: <body>
Here is a message from iChat to Salut</body>
(telepathy-salut:31900): wocky-DEBUG: _end_element_ns: Received stanza
- message xmlns='jabber:client' to='wjt@queeg' type='chat' "
" * body "Here is a message from iChat to Salut" * html xmlns='http://jabber.org/protocol/xhtml-im' * body xmlns='http://www.w3.org/1999/xhtml' style='background-color:#fc86ca;color:#000000;' * span style='font-family: 'Helvetica';font-size: 12px;' "Here is a message from iChat to Salut" * x xmlns='jabber:x:event' * composing (telepathy-salut:31900): wocky-DEBUG: handle_stanza: wocky-c2s-porter.c:1023: Stanza not handled
Salut-to-Salut works. The main difference I see is that iChat does not include from='' in the . WockyMetaPorter does this:
if (handler->contact != NULL) { gchar *jid = wocky_contact_dup_jid (handler->contact);
id = wocky_porter_register_handler_from_by_stanza (porter,
handler->type, handler->sub_type, jid,
handler->priority, porter_handler_cb, handler,
handler->stanza);
g_free (jid);
}
else { id = wocky_porter_register_handler_from_anyone_by_stanza (porter, handler->type, handler->sub_type, handler->priority, porter_handler_cb, handler, handler->stanza); }
I guess that, really, we know that any stanzas coming in are from the contact we think they are, so perhaps the MetaPorter should always use from_anyone() and then forcibly replace from=''?
Version: 0.8