pidgin/ljfisher-ssl-client-auth

Parents 92cb32a21383
Children e0c386103244
When receiving an invite to join a GroupChat, first check if a matching room entry
already exists (ie, already joined, or invite popup still pending).
If so, just ignore the invite.
--- a/libpurple/protocols/mxit/multimx.c Sat Aug 13 17:11:59 2011 +0000
+++ b/libpurple/protocols/mxit/multimx.c Sat Aug 13 22:01:39 2011 +0000
@@ -277,7 +277,11 @@
GHashTable *components;
struct multimx* multimx = NULL;
- purple_debug_info(MXIT_PLUGIN_ID, "Groupchat invite to '%s' by '%s'\n", contact->alias, creator);
+ purple_debug_info(MXIT_PLUGIN_ID, "Groupchat invite to '%s' (roomid='%s') by '%s'\n", contact->alias, contact->username, creator);
+
+ /* Check if the room already exists (ie, already joined or invite pending) */
+ if (find_room_by_username(session, contact->username) != NULL)
+ return;
/* Create a new room */
multimx = room_create(session, contact->username, contact->alias, STATE_INVITED);
@@ -307,7 +311,7 @@
multimx = find_room_by_username(session, contact->username);
if (multimx == NULL) {
multimx = room_create(session, contact->username, contact->alias, TRUE);
- }
+ }
else if (multimx->state == STATE_INVITED) {
/* After successfully accepting an invitation */
multimx->state = STATE_JOINED;