After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 525559 - Ignore muc invitations
Ignore muc invitations
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
0.22.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
: 558365 (view as bug list)
Depends on:
Blocks: 528311
 
 
Reported: 2008-04-01 14:56 UTC by Guillaume Desmottes
Modified: 2009-02-13 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
WIP patch (2.85 KB, patch)
2008-11-16 19:23 UTC, Guillaume Desmottes
none Details | Review
improved patch (7.71 KB, patch)
2008-11-20 16:47 UTC, Guillaume Desmottes
reviewed Details | Review
new patch using dispatcher (6.23 KB, patch)
2009-02-06 09:57 UTC, Guillaume Desmottes
none Details | Review
improved version (6.58 KB, patch)
2009-02-10 16:02 UTC, Guillaume Desmottes
none Details | Review
translate invite msg (6.58 KB, patch)
2009-02-10 16:26 UTC, Guillaume Desmottes
none Details | Review
fix Xavier's review comments (6.25 KB, patch)
2009-02-11 10:41 UTC, Guillaume Desmottes
none Details | Review
[PATCH] empathy-event-manager: we don't need EmpathyTpGroup anymore (6.25 KB, patch)
2009-02-11 15:08 UTC, Guillaume Desmottes
none Details | Review
latest patch (6.25 KB, patch)
2009-02-11 15:45 UTC, Guillaume Desmottes
none Details | Review
[PATCH] event_manager_approve_channel_cb: check if the channel implements the group iface so that should work for Butterfly chats too (6.13 KB, patch)
2009-02-12 14:07 UTC, Guillaume Desmottes
none Details | Review
good catches. Fixed in this patch. (6.01 KB, patch)
2009-02-12 14:52 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2008-04-01 14:56:09 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.
Comment 1 Olivier Le Thanh Duong 2008-04-11 14:56:20 UTC
I can confirm,  MUC invitation sended from Pidgin are also ignored
Comment 2 robert 2008-11-13 13:22:33 UTC
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.

Comment 3 Frederic Peters 2008-11-13 13:30:16 UTC
Guillaume, how does it relate to bug 558365 ?
Comment 4 Guillaume Desmottes 2008-11-14 16:48:15 UTC
*** Bug 558365 has been marked as a duplicate of this bug. ***
Comment 5 Guillaume Desmottes 2008-11-16 19:10:00 UTC
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
Comment 6 Guillaume Desmottes 2008-11-16 19:23:21 UTC
Created attachment 122812 [details] [review]
WIP patch
Comment 7 Guillaume Desmottes 2008-11-20 16:43:21 UTC
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.
Comment 8 Guillaume Desmottes 2008-11-20 16:47:33 UTC
Created attachment 123120 [details] [review]
improved patch
Comment 9 Frederic Peters 2008-11-28 10:42:24 UTC
Works fine for me.
Comment 10 Guillaume Desmottes 2008-12-18 16:28:07 UTC
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).

Comment 11 Guillaume Desmottes 2009-02-06 09:56:44 UTC
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
Comment 12 Guillaume Desmottes 2009-02-06 09:57:46 UTC
Created attachment 128084 [details] [review]
new patch using dispatcher
Comment 13 Guillaume Desmottes 2009-02-06 10:56:07 UTC
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.
Comment 14 Frederic Peters 2009-02-06 11:07:40 UTC
Please ask... http://live.gnome.org/ReleasePlanning/RequestingFreezeBreaks
Comment 15 Guillaume Desmottes 2009-02-10 16:02:20 UTC
Created attachment 128385 [details] [review]
improved version

This new version uses TpChannel API instead of EmpathyTpGroup and doesn't use _run functions anymore.
Comment 16 Guillaume Desmottes 2009-02-10 16:26:46 UTC
Created attachment 128389 [details] [review]
translate invite msg
Comment 17 Guillaume Desmottes 2009-02-10 16:29:25 UTC
UI freeze break requested. Waiting reply from the release team.
Comment 18 Guillaume Desmottes 2009-02-11 10:41:39 UTC
Created attachment 128456 [details] [review]
fix Xavier's review comments
Comment 19 Guillaume Desmottes 2009-02-11 14:16:10 UTC
Got approval of the release team; waiting the one from the doc team.
Comment 20 Guillaume Desmottes 2009-02-11 15:08:58 UTC
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(-)
Comment 21 Guillaume Desmottes 2009-02-11 15:45:57 UTC
Created attachment 128472 [details] [review]
latest patch

 src/empathy-event-manager.c |  163 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 161 insertions(+), 2 deletions(-)
Comment 22 Xavier Claessens 2009-02-12 10:44:44 UTC
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.
Comment 23 Guillaume Desmottes 2009-02-12 14:07:37 UTC
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(-)
Comment 24 Xavier Claessens 2009-02-12 14:29:45 UTC
+          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.
Comment 25 Guillaume Desmottes 2009-02-12 14:52:08 UTC
Created attachment 128569 [details] [review]
good catches. Fixed in this patch.

 src/empathy-event-manager.c |  156 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 155 insertions(+), 1 deletions(-)
Comment 26 Guillaume Desmottes 2009-02-12 16:01:08 UTC
Release and documentation approved the freeze break, so we can merge this branch as soon reviewers are happy with it.
Comment 27 Guillaume Desmottes 2009-02-13 10:22:52 UTC
Merged to 'to-merge' branch. Should reach master soon.