Skip to content
Snippets Groups Projects
Commit 93683a8c authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent traceback in trigger plugin.

parent b7316cc2
No related branches found
No related tags found
No related merge requests found
[info]
name: Triggers
short_name: triggers
version: 0.0.2
version: 0.0.3
description: Configure Gajim's behaviour for each contact
authors: Yann Leboulanger <asterix@lagaule.org>
homepage: http://trac.gajim.org/wiki/
......@@ -48,8 +48,10 @@ class Triggers(GajimPlugin):
if rule['recipient_type'] == 'contact' and obj.jid not in \
rule_recipients:
return False
contact_groups = gajim.contacts.get_first_contact_from_jid(
obj.conn.name, obj.jid).groups
contact = gajim.contacts.get_first_contact_from_jid(obj.conn.name, obj.jid)
if not contact: # PM?
return False
contact_groups = contact.groups
group_found = False
for group in contact_groups:
if group in rule_recipients:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment