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 669984 - Does not notify when contacts are added to groups
Does not notify when contacts are added to groups
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: Telepathy backend
git master
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks: 501065
 
 
Reported: 2012-02-13 13:15 UTC by Guillaume Desmottes
Modified: 2012-03-26 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathy: Handle contact removals from groups (5.59 KB, patch)
2012-03-04 13:15 UTC, Philip Withnall
committed Details | Review
folks log for the remaining problem (7.48 KB, text/plain)
2012-03-04 13:17 UTC, Philip Withnall
  Details
dbus-monitor log for the remaining problem (14.97 KB, text/plain)
2012-03-04 13:17 UTC, Philip Withnall
  Details

Description Guillaume Desmottes 2012-02-13 13:15:53 UTC
- Pick an Individual having a persona on XMPP in a group 'A'
- On this XMPP connection, call RenameGroup('A', 'B')
- The FolksIndividual::group-changed signal is fired once to say that the individual is no longer in 'A' (which is correct) but should be also fired to announce that he's in 'B' now.

Are you watching new group channels? I suspect moving to the new ContactList API would make this easier to fix (bug #630822)
Comment 1 Philip Withnall 2012-03-04 13:15:12 UTC
Created attachment 208949 [details] [review]
telepathy: Handle contact removals from groups 

This patch should fix the problem by handling contacts removed from groups on the GroupMembersChanged signal. However, it doesn't work perfectly for me since tp-gabble seems to be misbehaving.

If I have a contact in group A, then call RenameGroup('A', 'B'), the contact will now be added to group B, removed from group A — but then removed from group B again. This is because tp-gabble is emitting a spurious GroupsChanged signal which removes the contact from group B again. This is with gabble (master, 0a7c66f48e2a4f5f1b80237def4063fa952ccc71), and I'm fairly sure it's not a folks problem (though I could be wrong).

dbus-monitor and folks debug logs coming soon.
Comment 2 Philip Withnall 2012-03-04 13:17:06 UTC
Created attachment 208950 [details]
folks log for the remaining problem

This is a log of the output from folks using a set of extra debug messages I added for testing.

The contact was originally in the “More People” group. I then renamed “More People” to just “People” — the contact was added to “People”, removed from “More People”, but then removed from “People” again.
Comment 3 Philip Withnall 2012-03-04 13:17:54 UTC
Created attachment 208951 [details]
dbus-monitor log for the remaining problem

dbus-monitor log of the same test run. You can see the spurious GroupsChanged/MembersChanged/MembersChangedDetailed signals at the bottom of the log.
Comment 4 Philip Withnall 2012-03-04 20:31:37 UTC
Patches are available in this branch: https://www.gitorious.org/folks/folks/commits/669984-renaming-groups
Comment 5 Guillaume Desmottes 2012-03-19 14:19:49 UTC
First patch looks good; assuming you do want the \n\n in the source.
The second one shouldn't  be merged according to its commit msg.
Comment 6 Philip Withnall 2012-03-20 23:39:55 UTC
(In reply to comment #5)
> First patch looks good; assuming you do want the \n\n in the source.
> The second one shouldn't  be merged according to its commit msg.

The \n\n in the first patch was a mistake which I'll fix before committing. The second patch needs a lot of tidying up before committing, and I'll do that once this bug's fixed.

Did you get a chance to test the first patch and see if it fixes your original issue?
Comment 7 Guillaume Desmottes 2012-03-26 10:51:23 UTC
(In reply to comment #6)

> Did you get a chance to test the first patch and see if it fixes your original
> issue?

Yep; it works fine now, thanks!
Comment 8 Philip Withnall 2012-03-26 11:02:43 UTC
Comment on attachment 208949 [details] [review]
telepathy: Handle contact removals from groups 

Committed with the \n\n fixed, and without the additional debug messages in the second commit (I'll tidy them up and commit them later).

commit 0010985fe858635b1ba059cdfa1b4d5e2468dd4a
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Sun Mar 4 13:10:30 2012 +0000

    telepathy: Handle contact removals from groups
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=669984

 NEWS                                          |    1 +
 backends/telepathy/lib/tpf-persona-store.vala |   63 ++++++++++++++++++++----
 backends/telepathy/lib/tpf-persona.vala       |   10 ++--
 folks/individual.vala                         |    8 +---
 4 files changed, 58 insertions(+), 24 deletions(-)