Mercurial > pidgin
changeset 15647:193456f03b9c
Sending XEP 85 'gone' messages
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 16 Feb 2007 00:40:35 +0000 |
parents | 602eb093e4c0 |
children | e86623eb3b79 |
files | libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/message.c libpurple/protocols/jabber/message.h |
diffstat | 3 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Thu Feb 15 23:25:50 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.c Fri Feb 16 00:40:35 2007 +0000 @@ -1431,6 +1431,8 @@ g_free(jbr->thread_id); jbr->thread_id = NULL; } + if(jbr->chat_states == JABBER_CHAT_STATES_SUPPORTED) + jabber_message_conv_closed(js, who); } jabber_id_free(jid);
--- a/libpurple/protocols/jabber/message.c Thu Feb 15 23:25:50 2007 +0000 +++ b/libpurple/protocols/jabber/message.c Fri Feb 16 00:40:35 2007 +0000 @@ -635,3 +635,15 @@ return 0; } +void jabber_message_conv_closed(JabberStream *js, const char *who) +{ + JabberMessage *jm = g_new0(JabberMessage, 1); + jm->js = js; + jm->type = JABBER_MESSAGE_CHAT; + jm->to = g_strdup(who); + jm->id = jabber_get_next_id(jm->js); + jm->typing_style = JM_TS_JEP_0085; + jm->chat_state = JM_STATE_GONE; + jabber_message_send(jm); + jabber_message_free(jm); +}
--- a/libpurple/protocols/jabber/message.h Thu Feb 15 23:25:50 2007 +0000 +++ b/libpurple/protocols/jabber/message.h Fri Feb 16 00:40:35 2007 +0000 @@ -22,6 +22,7 @@ #ifndef _GAIM_JABBER_MESSAGE_H_ #define _GAIM_JABBER_MESSAGE_H_ +#include "buddy.h" #include "jabber.h" #include "xmlnode.h" @@ -72,6 +73,6 @@ int jabber_message_send_chat(GaimConnection *gc, int id, const char *message, GaimMessageFlags flags); unsigned int jabber_send_typing(GaimConnection *gc, const char *who, GaimTypingState state); - +void jabber_message_conv_closed(JabberStream *js, const char *who); #endif /* _GAIM_JABBER_MESSAGE_H_ */