[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-messenger-build/master] Add a patch for trac 17494



commit 42d8655596792dd173089521e809b4c555dedb0e
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Tue Feb 9 21:04:06 2016 -0800

    Add a patch for trac 17494
    
     * Better error reporting for failed outgoing messages.
---
 ChangeLog                             |  1 +
 projects/instantbird/config           |  1 +
 projects/instantbird/trac-17494.patch | 85 +++++++++++++++++++++++++++++++++++
 3 files changed, 87 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 43ddb54..37f1c45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@ Tor Messenger --
    * Bug 13795: Remove SPI root certificate because Debian no longer ships it
    * Bug 18094: Remove references to torbutton from start-tor-messenger script
    * Bug 18235: Disable Facebook as they no longer support XMPP
+   * Bug 17494: Better error reporting for failed outgoing messages
  * Mac
    * Bug 17896: Add Edit menu to the conversation window on OS X
  * Windows
diff --git a/projects/instantbird/config b/projects/instantbird/config
index b0fb789..3412ab9 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -74,6 +74,7 @@ input_files:
   - filename: trac-17552.patch
   - filename: trac-16489.patch
   - filename: trac-17896.patch
+  - filename: trac-17494.patch
   - filename: version.patch
   - filename: search-context-menu.patch
   - filename: search-preferences-xul.patch
diff --git a/projects/instantbird/trac-17494.patch b/projects/instantbird/trac-17494.patch
new file mode 100644
index 0000000..c2f2697
--- /dev/null
+++ b/projects/instantbird/trac-17494.patch
@@ -0,0 +1,85 @@
+
+# HG changeset patch
+# User Arlo Breault <arlolra@xxxxxxxxx>
+# Date 1454457891 28800
+# Node ID 4cfc2a04ebe02f53d789c7c27f8c3cd2a40b6483
+# Parent  19694424a48639d4f9ca458e3e891292e0c2ae1e
+Bug 1245325 - Better error reporting for failed outgoing messages. r=clokep
+
+diff --git a/chat/locales/en-US/xmpp.properties b/chat/locales/en-US/xmpp.properties
+--- a/chat/locales/en-US/xmpp.properties
++++ b/chat/locales/en-US/xmpp.properties
+@@ -61,31 +61,33 @@ conversation.error.changeTopicFailedNotA
+ #   %2$S is the text of the message that wasn't delivered.
+ conversation.error.sendFailedAsNotInRoom=Message could not be sent to %1$S as you are no longer in the room: %2$S
+ #   This is displayed in a conversation as an error message when the user sends
+ #   a message to a room that the recipient is not in.
+ #   %1$S is the jid of the recipient.
+ #   %2$S is the text of the message that wasn't delivered.
+ conversation.error.sendFailedAsRecipientNotInRoom=Message could not be sent to %1$S as the recipient is no longer in the room: %2$S
+ #   These are displayed in a conversation as a system error message.
+-conversation.error.remoteServerNotFound=Could not reach the recipient's server
++conversation.error.remoteServerNotFound=Could not reach the recipient's server.
++conversation.error.unknownSendError=An unknown error occurred on sending this message.
++#   %S is the name of the message recipient.
++conversation.error.sendServiceUnavailable=It is not possible to send messages to %S at this time.
+ #   %S is the nick of participant that is not in room.
+ conversation.error.nickNotInRoom=%S is not in the room.
+ conversation.error.banCommandAnonymousRoom=You can't ban participants from anonymous rooms. Try /kick instead.
+ conversation.error.banKickCommandNotAllowed=You don't have the required privileges to remove this participant from the room.
+ conversation.error.banKickCommandConflict=Sorry, you can't remove yourself from the room.
+ conversation.error.changeNickFailedConflict=Could not change your nick to %S as this nick is already in use.
+ conversation.error.changeNickFailedNotAcceptable=Could not change your nick to %S as nicks are locked down in this room.
+ conversation.error.inviteFailedForbidden=You don't have the required privileges to invite users to this room.
+ #   %S is the jid of user that is invited.
+ conversation.error.failedJIDNotFound=Could not reach %S.
+ #   %S is the jid that is invalid.
+ conversation.error.invalidJID=%S is an invalid jid (Jabber identifiers must be of the form user@domain).
+ conversation.error.commandFailedNotInRoom=You have to rejoin the room to be able to use this command.
+-conversation.error.unknownError=Unknown error
+ 
+ # LOCALIZATION NOTE (tooltip.*):
+ #   These are the titles of lines of information that will appear in
+ #   the tooltip showing details about a contact or conversation.
+ # LOCALIZATION NOTE (tooltip.status):
+ #   %S will be replaced by the XMPP resource identifier
+ tooltip.status=Status (%S)
+ tooltip.statusNoResource=Status
+diff --git a/chat/protocols/xmpp/xmpp.jsm b/chat/protocols/xmpp/xmpp.jsm
+--- a/chat/protocols/xmpp/xmpp.jsm
++++ b/chat/protocols/xmpp/xmpp.jsm
+@@ -674,21 +674,28 @@ var XMPPConversationPrototype = {
+     this._targetResource = this._account._parseJID(from).resource;
+     let flags = {};
+     let error = this._account.parseError(aStanza);
+     if (error) {
+       let norm = this._account.normalize(from);
+       let muc = this._account._mucs.get(norm);
+ 
+       if (!aMsg) {
+-        // Failed outgoing message unknown.
+-        if (error.condition == "remote-server-not-found")
+-          aMsg = _("conversation.error.remoteServerNotFound");
+-        else
+-          aMsg = _("conversation.error.unknownError");
++        // Failed outgoing message.
++        switch (error.condition) {
++          case "remote-server-not-found":
++            aMsg = _("conversation.error.remoteServerNotFound");
++            break;
++          case "service-unavailable":
++            aMsg = _("conversation.error.sendServiceUnavailable", this.shortName);
++            break;
++          default:
++            aMsg = _("conversation.error.unknownSendError");
++            break;
++        }
+       }
+       else if (this._isMucParticipant && muc && !muc.left &&
+                error.condition == "item-not-found") {
+         // XEP-0045 (7.5): MUC private messages.
+         // If we try to send to participant not in a room we are in.
+         aMsg = _("conversation.error.sendFailedAsRecipientNotInRoom",
+                  this._targetResource, aMsg);
+       }
+

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits