[polari/wip/fmuellner/misc-fixes: 1/8] app: Fix restored account names



commit 5d720842a8a485f256ae40cd0d4c0db73f80e313
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Aug 1 01:49:47 2016 +0200

    app: Fix restored account names
    
    When a connection fails because the used account is already connected,
    we retry the connection up to three times appending '_' to the account
    name on each attempt, and restore the original nick after either
    connecting successfully or giving up. However the nickname property we
    currently use to restore the account name is ill-suited for that
    purpose, as it doesn't necessarily match the account parameter, but
    rather the nickname that was active when last connected (which may
    be a temporary nick picked by the user like 'nick-afk', or indeed
    have the underscore suffix we want to revert).
    We want to restore the original account parameter, so actually use that
    parameter rather than a property that may or may not match ...
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769583

 src/application.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index f0ce399..23155af 100644
--- a/src/application.js
+++ b/src/application.js
@@ -382,7 +382,7 @@ const Application = new Lang.Class({
           cancellable: new Gio.Cancellable(),
           time: time,
           retry: 0,
-          originalNick: account.nickname,
+          originalNick: params['account'].deep_unpack(),
           callback: callback,
           alternateServers: accountServers.filter(s => s.address != server)
         };


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