[polari/wip/fmuellner/nickserv: 18/20] telepathyClient: Ask users whether to save "identify" passwords
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/nickserv: 18/20] telepathyClient: Ask users whether to save "identify" passwords
- Date: Tue, 9 Aug 2016 01:31:13 +0000 (UTC)
commit af39fb77b4bdc8f772bc180a784a82c44d0162c8
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Aug 2 21:49:13 2016 +0200
telepathyClient: Ask users whether to save "identify" passwords
To identify with NickServ, users don't need to actually select the
corresponding room - they could use the /msg command or gnome-shell's
built-in chat notifications. As the user likely won't see the info
bar added in the previous commit in that case, use a notification
to ask for confirmation when the bot's room isn't active.
https://bugzilla.gnome.org/show_bug.cgi?id=709982
src/telepathyClient.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index 95edfbe..f1e4eb8 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -468,6 +468,19 @@ const TelepathyClient = new Lang.Class({
password: password
};
this._pendingBotPasswords.set(accountPath, data);
+
+ if (this._app.isRoomFocused(room))
+ return;
+
+ let accountName = room.account.display_name;
+ let summary = _("Save %s password for %s?").format(data.botname, accountName);
+ let text = _("Identification will happen automatically the next time you connect to
%s").format(accountName);
+ let notification = this._createNotification(room, summary, text);
+
+ notification.add_button_with_target(_("Save"), 'app.save-identify-password',
+ new GLib.Variant('o', accountPath));
+
+ this._app.send_notification(null, notification);
},
_onMessageReceived: function(channel, msg) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]