GNOME Bugzilla – Bug 525559
Ignore muc invitations
Last modified: 2009-02-13 10:22:52 UTC
One of my friend send me a muc invitation using gajim and Empathy ignored it. The invitations was properly managed by Gabble (muc channel created and self handle in local pending). Empathy log displayed: StatusIcon: New text channel to be filtered for contact foo@conference.jabber.belnet.be I'm using Empathy 0.22.0-1 (Hardy package) and tp-glib 0.7.5-1~ppa8.04+1.
I can confirm, MUC invitation sended from Pidgin are also ignored
I've observed the following behaviour: * Been invited to a MUC. Nothing happened. * Been told about the MUC and tried to join manually. Nothing happened. I guess this is the reason: * Pending MUC channel appeared and was not handled by the dispatcher. * Joining the channel manually made a successful RequestChannel call but was given the invite channel in which I was local pending. * AddMembers was not called to accept the invite, so the join process didn't proceed. Fixes would therefore be: * Implement invites. * Call AddMembers (self_handle) on all rooms and calls you've requested, to de-pending any pending things which are received. This was, at one point, recommended best practice because we were going to make some settings tweakable in a MUC between requesting the channel and actually becoming a member, although this is less necessary with the Requests interface.
Guillaume, how does it relate to bug 558365 ?
*** Bug 558365 has been marked as a duplicate of this bug. ***
I started to implement incoming invitation support. It's far from being finished but I probably won't have time to continue to work on it this week. So feel free to continue if you want. http://git.collabora.co.uk/?p=user/cassidy/empathy.git;a=shortlog;h=refs/heads/muc-invite
Created attachment 122812 [details] [review] WIP patch
I added the confirmation dialog. Code is pretty crap atm but seems to work; tests and feedback welcome. Things that should be improved/discussed: - I wrote the confirmation dialog and close/join code in empathy.c. I guess there should have a better place where to put this code. - The code checking "I'am invited to this channel?" is duplicated in event_manager_filter_channel_cb and dispatch_channel_cb. Maybe it should be factored out. - I'm wondering if it's really worth to use EmpathyTpGroup API instead of TpChannel's one directly.
Created attachment 123120 [details] [review] improved patch
Works fine for me.
Review of http://git.collabora.co.uk/?p=user/xclaesse/empathy.git;a=shortlog;h=refs/heads/muc-invite - The bug number is not present in any commit msg. - Which version of tp-glib provides tp_channel_get_identifier? If it's unreleased, then we have to wait for release. In any case, dep in configure.ac should be bumped and desktop-devel should be informed of it. - empathy_channel_get_contact: what the rational of: + g_object_set_data_full (G_OBJECT (contact), "empathy-factory", + factory, g_object_unref); ? - AFAIK, we try to avoid to use _run functions. Is there an alternative to empathy_contact_run_until_ready ? - present_channel We tend to use if (ptr != NULL) instead of if (ptr).
I re-implemented this using the new dispatcher: http://git.collabora.co.uk/?p=user/cassidy/empathy.git;a=shortlog;h=refs/heads/muc-invite-NEW
Created attachment 128084 [details] [review] new patch using dispatcher
That would break UI freeze but I think it's important to have this feature merged for 2.26. It would be silly to be able to send invitations but not handle incoming ones.
Please ask... http://live.gnome.org/ReleasePlanning/RequestingFreezeBreaks
Created attachment 128385 [details] [review] improved version This new version uses TpChannel API instead of EmpathyTpGroup and doesn't use _run functions anymore.
Created attachment 128389 [details] [review] translate invite msg
UI freeze break requested. Waiting reply from the release team.
Created attachment 128456 [details] [review] fix Xavier's review comments
Got approval of the release team; waiting the one from the doc team.
Created attachment 128469 [details] [review] [PATCH] empathy-event-manager: we don't need EmpathyTpGroup anymore src/empathy-event-manager.c | 163 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 161 insertions(+), 2 deletions(-)
Created attachment 128472 [details] [review] latest patch src/empathy-event-manager.c | 163 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 161 insertions(+), 2 deletions(-)
We should probably support MSN-like chats too: Instead of checking if there is an invitation on channel of type ROOM only, we should check on any channel with the Group interface. Using butterfly, all text channel have a Group interface, and members can be added at any time. Empathy's chat UI supports upgrade from private chat to MUC (and downgrade as well). Butterfly currently set the handle type of the channel as CONTACT, but IMO it should set it to NONE. When EmpathyTpChat sees there is a group interface, it does not use the channel's handle at all, but rely on the group members.
Created attachment 128560 [details] [review] [PATCH] event_manager_approve_channel_cb: check if the channel implements the group iface so that should work for Butterfly chats too src/empathy-event-manager.c | 160 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 159 insertions(+), 1 deletions(-)
+ if (self_handle != 0 || tp_channel_group_get_local_pending_info ( + channel, self_handle, &inviter, NULL, NULL)) --> should be a &&, no? + handle = tp_channel_get_handle (channel, &handle_type); --> not used anymore, right? Otherwise it's fine.
Created attachment 128569 [details] [review] good catches. Fixed in this patch. src/empathy-event-manager.c | 156 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 155 insertions(+), 1 deletions(-)
Release and documentation approved the freeze break, so we can merge this branch as soon reviewers are happy with it.
Merged to 'to-merge' branch. Should reach master soon.