fix: Fix issue with unknown SM function
This commit is contained in:
parent
79280d9d59
commit
21a6141ff0
@ -111,7 +111,7 @@ class JanineModule(BaseModule):
|
||||
if warning.id in ids:
|
||||
continue
|
||||
|
||||
for jid, _ in self._sum.get_subscriptions_for_keywords(warning.landkreise):
|
||||
for jid in self._sum.get_subscriptions_for_keywords(warning.landkreise):
|
||||
body = format_warning(warning)
|
||||
self.send_message(aioxmpp.JID.fromstr(jid), body)
|
||||
|
||||
@ -128,7 +128,7 @@ class JanineModule(BaseModule):
|
||||
return
|
||||
|
||||
bare = str(msg.from_.bare())
|
||||
if self._sum.is_subscribed_to(bare, landkreis):
|
||||
if self._sum.is_subscribed_to_keyword(bare, landkreis):
|
||||
self.send_message(
|
||||
msg.from_, 'Du hast den "%s" bereits abonniert' % (landkreis)
|
||||
)
|
||||
@ -147,7 +147,7 @@ class JanineModule(BaseModule):
|
||||
|
||||
landkreis = " ".join(cmd[1:])
|
||||
bare = str(msg.from_.bare())
|
||||
if not self._sum.is_subscribed_to(bare, landkreis):
|
||||
if not self._sum.is_subscribed_to_keyword(bare, landkreis):
|
||||
self.send_message(msg.from_, 'Du hast "%s" nicht abonniert' % (landkreis))
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user