[polari/gnome-3-20] app: Fix filtering of alternate servers



commit c9dfa85bb0612612eb70ec10dc53de211b3783da
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Aug 2 22:42:30 2016 +0200

    app: Fix filtering of alternate servers
    
    When connecting to a server of a predefined network fails, we use
    the list of servers to keep trying. The intention of the code is
    to skip the server that already failed, but as we currently compare
    an object to a string, we end up including it anyway.
    Fix the filtering function to produce the expected result.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766935

 src/application.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 9eb6096..73f36e9 100644
--- a/src/application.js
+++ b/src/application.js
@@ -391,7 +391,7 @@ const Application = new Lang.Class({
           retry: 0,
           originalNick: account.nickname,
           callback: callback,
-          alternateServers: accountServers.filter(s => s != server)
+          alternateServers: accountServers.filter(s => s.address != server)
         };
 
         this._pendingRequests[roomId] = requestData;


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