[polari/wip/fmuellner/misc-fixes: 2/9] app: Fix restored account names



commit 702a79abbc4a3eaee0f9feecb27dd3809999d275
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 21a3377..34a2713 100644
--- a/src/application.js
+++ b/src/application.js
@@ -379,7 +379,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]