Closed Bug 954788 Opened 10 years ago Closed 10 years ago

JS-protocols should close their conversations and remove their buddies when they are removed

Categories

(Chat Core :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florian, Assigned: florian)

Details

(Whiteboard: [1.2-blocking])

Attachments

(1 file, 1 obsolete file)

*** Original post on bio 1354 at 2012-03-27 14:50:00 UTC ***

*** Due to BzAPI limitations, the initial description is in comment 1 ***
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 1354 as attmnt 1271 at 2012-03-27 14:50:00 UTC ***

Currently libpurple accounts do this when they are uninitialized, and we ignore these signals from libpurple if they are fired during shutdown.
JS protocols can't rely on this hack, and currently don't do this at all anyway.
Attachment #8353024 - Flags: review?(clokep)
Whiteboard: [1.2-blocking]
Comment on attachment 8353024 [details] [diff] [review]
Patch

*** Original change on bio 1354 attmnt 1271 at 2012-03-27 14:56:47 UTC ***

>diff --git a/chat/modules/jsProtoHelper.jsm b/chat/modules/jsProtoHelper.jsm
>@@ -102,16 +103,17 @@ const ForwardAccountPrototype = {
> const GenericAccountPrototype = {
>+  remove: function() {},
Should this throw NS_ERROR_NOT_IMPLEMENTED so people making protocols know they should implement it?

>   unInit: function() {},
>   connect: function() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; },
>   disconnect: function() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; },
>   createConversation: function(aName) { throw Cr.NS_ERROR_NOT_IMPLEMENTED; },
>   joinChat: function(aComponents) { throw Cr.NS_ERROR_NOT_IMPLEMENTED; },

>diff --git a/chat/protocols/xmpp/xmpp.jsm b/chat/protocols/xmpp/xmpp.jsm
>@@ -181,20 +181,33 @@ const XMPPMUCConversationPrototype = {
>+  _left: false,
>+  get left() this._left,
>+  set left(aLeft) {
>+    if (aLeft == this._left)
>+      return;
>+
>+    this._left = aLeft;
>+    if (this._left)
>+      this.notifyObservers(null, "update-conv-chatleft");
>+  },
>+
Please fall back to the jsProtoHelper version here.

The rest looks OK. :)
Attachment #8353024 - Flags: review?(clokep) → review-
Attached patch Patch v2Splinter Review
*** Original post on bio 1354 as attmnt 1272 at 2012-03-27 16:09:00 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353025 - Flags: review?(clokep)
Comment on attachment 8353024 [details] [diff] [review]
Patch

*** Original change on bio 1354 attmnt 1271 at 2012-03-27 16:09:03 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353024 - Attachment is obsolete: true
Assignee: nobody → florian
Comment on attachment 8353025 [details] [diff] [review]
Patch v2

*** Original change on bio 1354 attmnt 1272 at 2012-03-27 16:11:08 UTC ***

Looks good! Thanks for fixing this. :)
Attachment #8353025 - Flags: review?(clokep) → review+
*** Original post on bio 1354 at 2012-03-28 10:31:25 UTC ***

Checked in as http://hg.instantbird.org/instantbird/rev/7f5dfa28bc4e
Status: NEW → RESOLVED
Closed: 10 years ago
OS: Other → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: