Philipp Hörist pushed to branch master at gajim / gajim
Commits: d4e30292 by lovetox at 2022-06-21T19:03:33+02:00 fix: GroupchatOutcasts: Make removing users work
- - - - -
1 changed file:
- gajim/gtk/groupchat_outcasts.py
Changes:
===================================== gajim/gtk/groupchat_outcasts.py ===================================== @@ -175,7 +175,7 @@ def _get_new_rows(self) -> set[OutcastRow]: reason=row[Column.REASON])) return rows
- def _get_diff(self) -> list[OutcastRow]: + def _get_diff(self) -> tuple[list[OutcastRow], list[OutcastRow]]:
new_rows = self._get_new_rows()
@@ -192,17 +192,20 @@ def _get_diff(self) -> list[OutcastRow]: same_rows = {row for row in new_rows if row.jid in same} modified_rows = list(same_rows - self._current_rows)
- return removed_rows + added_rows + modified_rows + return removed_rows, added_rows + modified_rows
def _set_outcasts(self) -> None: - diff_rows = self._get_diff() + removed_rows, other_rows = self._get_diff()
outcasts = {} - for row in diff_rows: + for row in other_rows: outcasts[row.jid] = {'affiliation': 'outcast'} if row.reason: outcasts[row.jid]['reason'] = row.reason
+ for row in removed_rows: + outcasts[row.jid] = {'affiliation': 'none'} + self._client.get_module('MUC').set_affiliation( self._contact.jid, outcasts,
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d4e3029221fbf7c8614cab5aa5a4ee3a9...