Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-04-04 12:32:04 +0300
committerlovetox <philipp@hoerist.com>2020-04-04 12:32:04 +0300
commitc1d2c8d7663181e712614a43f8dde5adc1c49399 (patch)
tree5513b42403cb7656320701fc67095cad27b79ce4 /tictactoe
parent4c14c130f8c5e72b9fe55b45558a8ea7a33cdd99 (diff)
[tictactoe] Adapt updating caps
Diffstat (limited to 'tictactoe')
-rw-r--r--tictactoe/plugin.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/tictactoe/plugin.py b/tictactoe/plugin.py
index 79e3a04..a456c58 100644
--- a/tictactoe/plugin.py
+++ b/tictactoe/plugin.py
@@ -97,25 +97,24 @@ class TictactoePlugin(GajimPlugin):
self.announce_caps = True
@log_calls('TictactoePlugin')
- def _update_caps(self, account):
+ def _update_caps(self, account, features):
if not self.announce_caps:
return
- if NS_GAMES not in app.gajim_optional_features[account]:
- app.gajim_optional_features[account].append(NS_GAMES)
- if NS_GAMES_TICTACTOE not in app.gajim_optional_features[account]:
- app.gajim_optional_features[account].append(NS_GAMES_TICTACTOE)
+
+ features.append(NS_GAMES)
+ features.append(NS_GAMES_TICTACTOE)
@log_calls('TictactoePlugin')
def activate(self):
- for account in app.caps_hash:
- if app.caps_hash[account] != '':
- self.announce_caps = True
- helpers.update_optional_features(account)
+ self.announce_caps = True
+ for con in app.connections.values():
+ con.get_module('Caps').update_caps()
@log_calls('TictactoePlugin')
def deactivate(self):
self.announce_caps = False
- helpers.update_optional_features()
+ for con in app.connections.values():
+ con.get_module('Caps').update_caps()
@log_calls('TictactoePlugin')
def connect_with_chat_control(self, control):