diff options
author | lovetox <philipp@hoerist.com> | 2022-01-10 15:52:19 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-01-10 15:52:19 +0300 |
commit | 708ed3dfd377d4902f5edfa8d9ebee280935a3ef (patch) | |
tree | 6caa6420604e75b7f27093c0d6faeb0b2c8fb5b2 | |
parent | c16f31ac8e960ce99f766ec073c1c7bd9da42e0d (diff) |
[triggers] Fix checking groups
-rw-r--r-- | triggers/triggers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/triggers/triggers.py b/triggers/triggers.py index 3d0cf4b..0ce8ccf 100644 --- a/triggers/triggers.py +++ b/triggers/triggers.py @@ -19,11 +19,9 @@ from __future__ import annotations from typing import Any -from typing import Optional from typing import Union import logging -from dataclasses import dataclass from functools import partial from gajim.common import app @@ -196,6 +194,9 @@ class Triggers(GajimPlugin): client = app.get_client(event.account) contact = client.get_module('Contacts').get_contact(event.jid) + if contact.is_groupchat or not contact.is_in_roster: + return False + group_found = False for group in contact.groups: if group in rule_recipients: |