# HG changeset patch # User Mikael Berthe # Date 1345902050 -7200 # Node ID 564d99cdf0d1248125a5aefcfed263dbf0310165 # Parent 33426f7fb4a912411ea3d81dd17f415dce6399a9 MUC: do not destroy previous room invitation to create a new one If a previous similar mediated invitation exists, we do not remove it to create a new one (it's very confusing) unless the new one looks better, e.g. if the new invitation allows us to decline the invitation and the old one did not. diff -r 33426f7fb4a9 -r 564d99cdf0d1 mcabber/mcabber/xmpp_muc.c --- a/mcabber/mcabber/xmpp_muc.c Sat Aug 25 12:05:31 2012 +0200 +++ b/mcabber/mcabber/xmpp_muc.c Sat Aug 25 15:40:50 2012 +0200 @@ -787,6 +787,13 @@ iel = iel -> next; if (!g_strcmp0(to, invitation->to) && !g_strcmp0(passwd, invitation->passwd)) { + // found a previous invitation + // We keep the old one, unless the current one is better and allows us + // to send a reply. + if (!reply || invitation->reply) { + g_free(barejid); + return; + } scr_LogPrint(LPRINT_DEBUG, "Destroying previous invitation event %s.", invitation->evid); evs_del(invitation->evid);