[polari] telepathyClient: Mute identify bots by default
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] telepathyClient: Mute identify bots by default
- Date: Wed, 1 Apr 2020 02:04:05 +0000 (UTC)
commit a4b46ba47a3980961d7642877ed43a8ff90cf606
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Apr 21 20:09:39 2019 +0200
telepathyClient: Mute identify bots by default
Once the user has saved an identify password and authentication is
automated, messages from the bot in question are unlikely to be
interesting. Account for that by automatically muting the bot when
saving the password.
https://gitlab.gnome.org/GNOME/polari/-/merge_requests/153
src/telepathyClient.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index de954ce5..d1ff05e6 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -507,6 +507,10 @@ class TelepathyClient extends Tp.BaseClient {
settings.set_string('identify-username', data.username);
settings.set_boolean('identify-username-supported', data.usernameSupported);
+
+ // We know it's a bot, mute it by default!
+ let tracker = this._userStatusMonitor.getUserTrackerForAccount(account);
+ tracker.muteNick(data.botname);
}
_onDiscardIdentifyPasswordActivated(action, parameter) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]