[polari/wip/fmuellner/misc-fixes: 1/8] app: Fix restored account names
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/misc-fixes: 1/8] app: Fix restored account names
- Date: Thu, 11 Aug 2016 08:42:32 +0000 (UTC)
commit c6282bed7b3490da5f08cc0b1e494d8e767b73c9
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 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 21a3377..9b244f9 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,
+ originalAccountName: params['account'].deep_unpack(),
callback: callback,
alternateServers: accountServers.filter(s => s.address != server)
};
@@ -471,7 +471,7 @@ const Application = new Lang.Class({
requestData.callback(channel);
if (requestData.retry > 0)
- this._updateAccountName(account, requestData.originalNick, null);
+ this._updateAccountName(account, requestData.originalAccountName, null);
this._pendingRequests.delete(requestData.roomId);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]