| 1 | === modified file 'protocols/bee_chat.c' |
|---|
| 2 | --- protocols/bee_chat.c 2010-09-05 23:30:40 +0000 |
|---|
| 3 | +++ protocols/bee_chat.c 2014-04-27 11:59:17 +0000 |
|---|
| 4 | @@ -99,8 +99,14 @@ |
|---|
| 5 | |
|---|
| 6 | if( bu && bee->ui->chat_msg ) |
|---|
| 7 | bee->ui->chat_msg( bee, c, bu, msg, sent_at ); |
|---|
| 8 | - else |
|---|
| 9 | - imcb_chat_log( c, "Message from unknown participant %s: %s", who, msg ); |
|---|
| 10 | + else { |
|---|
| 11 | + /* The user is not present in the room. Let's add him for |
|---|
| 12 | + * this one message, then remove him. |
|---|
| 13 | + */ |
|---|
| 14 | + bu = bee_user_new( bee, c->ic, who, BEE_USER_LOCAL ); |
|---|
| 15 | + bee->ui->chat_msg( bee, c, bu, msg, sent_at ); |
|---|
| 16 | + bee->ui->chat_remove_user( bee, c, bu ); |
|---|
| 17 | + } |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | void imcb_chat_log( struct groupchat *c, char *format, ... ) |
|---|
| 21 | |
|---|
| 22 | === modified file 'protocols/jabber/conference.c' |
|---|
| 23 | --- protocols/jabber/conference.c 2013-02-21 19:15:59 +0000 |
|---|
| 24 | +++ protocols/jabber/conference.c 2014-04-27 12:00:47 +0000 |
|---|
| 25 | @@ -409,7 +409,7 @@ |
|---|
| 26 | /* This can happen too, at least when receiving a backlog when |
|---|
| 27 | just joining a channel. */ |
|---|
| 28 | if( chat ) |
|---|
| 29 | - imcb_chat_log( chat, "Message from unknown participant %s: %s", nick, body->text ); |
|---|
| 30 | + imcb_chat_msg( chat, nick, body->text, 0, jabber_get_timestamp( node ) ); |
|---|
| 31 | else |
|---|
| 32 | imcb_log( ic, "Groupchat message from unknown JID %s: %s", s, body->text ); |
|---|
| 33 | } |
|---|
| 34 | |
|---|