diff options
Diffstat (limited to 'src/event/server_events.c')
-rw-r--r-- | src/event/server_events.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c index a56a54b0..baedd154 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -184,7 +184,23 @@ sv_ev_room_message(const char *const room_jid, const char *const nick, void sv_ev_incoming_private_message(const char *const fulljid, char *message) { - ui_incoming_private_msg(fulljid, message, NULL); + ProfPrivateWin *privatewin = wins_get_private(fulljid); + if (privatewin == NULL) { + ProfWin *window = wins_new_private(fulljid); + privatewin = (ProfPrivateWin*)window; + } + ui_incoming_private_msg(privatewin, message, NULL); +} + +void +sv_ev_delayed_private_message(const char *const fulljid, char *message, GDateTime *timestamp) +{ + ProfPrivateWin *privatewin = wins_get_private(fulljid); + if (privatewin == NULL) { + ProfWin *window = wins_new_private(fulljid); + privatewin = (ProfPrivateWin*)window; + } + ui_incoming_private_msg(privatewin, message, timestamp); } void @@ -320,12 +336,6 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m } void -sv_ev_delayed_private_message(const char *const fulljid, char *message, GDateTime *timestamp) -{ - ui_incoming_private_msg(fulljid, message, timestamp); -} - -void sv_ev_message_receipt(char *barejid, char *id) { ProfChatWin *chatwin = wins_get_chat(barejid); |