prevent traceback in trigger plugin.
This commit is contained in:
parent
b7316cc206
commit
93683a8c54
|
@ -1,7 +1,7 @@
|
|||
[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:
|
||||
|
|
Loading…
Reference in New Issue