diff options
author | kenobi <kenobi@rhea> | 2007-12-19 00:59:35 +0100 |
---|---|---|
committer | kenobi <kenobi@rhea> | 2007-12-19 00:59:35 +0100 |
commit | eded1f703a8f5d2272b9d294d8e3dfb48fa302b4 (patch) | |
tree | 9f372f50d123a258640c91a6dc3c027d9c8df4aa /protocols/jabber/jabber.c | |
parent | dc0ba9c85539533349353713162f94077fb27be3 (diff) |
Merged in 280..288 from upstream (e.g. PING)
Diffstat (limited to 'protocols/jabber/jabber.c')
-rw-r--r-- | protocols/jabber/jabber.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 98d2dadf..1d3225dd 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -422,6 +422,20 @@ static void jabber_chat_leave_( struct groupchat *c ) jabber_chat_leave( c, NULL ); } +static void jabber_chat_invite_( struct groupchat *c, char *who, char *msg ) +{ + struct jabber_chat *jc = c->data; + gchar *msg_alt = NULL; + + if( msg == NULL ) + msg_alt = g_strdup_printf( "%s invited you to %s", c->ic->acc->user, jc->name ); + + if( c && who ) + jabber_chat_invite( c, who, msg ? msg : msg_alt ); + + g_free( msg_alt ); +} + static void jabber_keepalive( struct im_connection *ic ) { /* Just any whitespace character is enough as a keepalive for XMPP sessions. */ @@ -493,7 +507,7 @@ void jabber_initmodule() ret->remove_buddy = jabber_remove_buddy; ret->chat_msg = jabber_chat_msg_; ret->chat_topic = jabber_chat_topic_; -// ret->chat_invite = jabber_chat_invite; + ret->chat_invite = jabber_chat_invite_; ret->chat_leave = jabber_chat_leave_; ret->chat_join = jabber_chat_join_; ret->keepalive = jabber_keepalive; |