Removing a contact with merged buddies doesn't work as expected

RESOLVED WONTFIX

Status

defect
RESOLVED WONTFIX
5 years ago
2 years ago

People

(Reporter: aleth, Assigned: aleth)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
STR
Remove a contact that contains more than one accountbuddy, each with a different name. The contact does not disappear. The displayed name on the contact does not change either. The currently active accountbuddy is removed (visible after restart).

Expected results:
This is not entirely defined: Do we want to remove all of the accountbuddies, or just the currently active one? The former may be more "correct", but the latter may be what the user is actually trying to do, and is safer. The current behaviour matches neither option.
The currently implemented behavior is to remove all the accountbuddies. The behavior you describe seems like the first account buddies throws when we attempt to remove it.
(Assignee)

Comment 2

5 years ago
(In reply to Florian Quèze [:florian] [:flo] from comment #1)
> The currently implemented behavior is to remove all the accountbuddies. The
> behavior you describe seems like the first account buddies throws when we
> attempt to remove it.

No, there is no error. And this doesn't look like it does what you describe:
http://mxr.mozilla.org/comm-central/source/im/content/blist.js#135
(Assignee)

Comment 3

5 years ago
To avoid possible confusion: I could have said "buddy" instead of "accountbuddy" in the description, it wouldn't make any difference.
(In reply to aleth [:aleth] from comment #2)
> (In reply to Florian Quèze [:florian] [:flo] from comment #1)
> > The currently implemented behavior is to remove all the accountbuddies. The
> > behavior you describe seems like the first account buddies throws when we
> > attempt to remove it.
> 
> No, there is no error. And this doesn't look like it does what you describe:
> http://mxr.mozilla.org/comm-central/source/im/content/blist.js#135

That code is just used to find a name to show in the modal confirm prompt.

See line 160:
160     this.target.delete();

Which then goes to http://hg.mozilla.org/comm-central/rev/a5850f3ecb9a#l3.16
(Assignee)

Comment 5

5 years ago
Thanks, I misread that - this makes things clearer.

What happens is that the _massRemove flag prevents notifications being sent out that would update the UI,
http://mxr.mozilla.org/comm-central/source/chat/components/src/imContacts.js#670,
but it's possible that an XMPP accountbuddy remove fails without error if the account is not connected,
http://mxr.mozilla.org/comm-central/source/chat/protocols/xmpp/xmpp.jsm#428
in which case the contact survives, but the UI is in the wrong state.
(Assignee)

Comment 6

5 years ago
Assignee: nobody → aleth
Status: NEW → ASSIGNED
Attachment #8467361 - Flags: review?(florian)
Attachment #8467361 - Flags: review?(florian)
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.