295
295
struct xt_node *subject = xt_find_node( node->children, "subject" );
296
296
struct xt_node *body = xt_find_node( node->children, "body" );
297
struct groupchat *chat;
297
struct groupchat *chat = NULL;
300
300
if( bud == NULL )
304
if( body == NULL || body->text_len == 0 )
305
/* Meh. Empty messages aren't very interesting, no matter
306
how much some servers love to send them. */
302
309
s = xt_find_attr( node, "from" ); /* pkt_message() already NULL-checked this one. */
303
if( strchr( s, '/' ) == NULL )
310
nick = strchr( s, '/' );
313
/* If this message included a resource/nick we don't know,
314
we might still know the groupchat itself. */
316
chat = jabber_chat_by_jid( ic, s );
323
/* message.c uses the EXACT_JID option, so bud should
324
always be NULL here for bare JIDs. */
325
chat = jabber_chat_by_jid( ic, s );
304
330
/* This is fine, the groupchat itself isn't in jd->buddies. */
305
imcb_log( ic, "System message from groupchat %s: %s", s, body? body->text : "NULL" );
332
imcb_chat_log( chat, "From conference server: %s", body->text );
334
imcb_log( ic, "System message from unknown groupchat %s: %s", s, body->text );
307
/* This, however, isn't fine! */
308
imcb_log( ic, "Groupchat message from unknown participant %s: %s", s, body ? body->text : "NULL" );
338
/* This can happen too, at least when receiving a backlog when
339
just joining a channel. */
341
imcb_chat_log( chat, "Message from unknown participant %s: %s", nick, body->text );
343
imcb_log( ic, "Groupchat message from unknown JID %s: %s", s, body->text );