GNOME Bugzilla – Bug 669984
Does not notify when contacts are added to groups
Last modified: 2012-03-26 11:02:51 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)
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.
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.
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.
Patches are available in this branch: https://www.gitorious.org/folks/folks/commits/669984-renaming-groups
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.
(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?
(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 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(-)