/pidgin/main: 12d65cad702b: Backported from 3.0.0-devel:

Andrew Victor andrew.victor at mxit.com
Sat Jul 28 18:48:58 EDT 2012

Changeset: 12d65cad702b62b9c36def9f11172a04680e9972
Author:	 Andrew Victor <andrew.victor at mxit.com>
Date:	 2012-07-28 22:26 +0200
Branch:	 mxit-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/12d65cad702b


Backported from 3.0.0-devel:

When receiving an invite to join a GroupChat, first check if a matching room
 already exists (ie, already joined, or invite popup still pending).
If so, just ignore the invite.

(Ref: http://pidgin.im/pipermail/commits/2011-August/019656.html)


 libpurple/protocols/mxit/multimx.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff --git a/libpurple/protocols/mxit/multimx.c b/libpurple/protocols/mxit/multimx.c
--- a/libpurple/protocols/mxit/multimx.c
+++ b/libpurple/protocols/mxit/multimx.c
@@ -277,7 +277,11 @@ void multimx_invite(struct MXitSession* 
 	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);

More information about the Commits mailing list