fix: Fix issue with unknown SM function

This commit is contained in:
PapaTutuWawa 2021-06-15 20:27:10 +02:00
parent 79280d9d59
commit 21a6141ff0
2 changed files with 4 additions and 4 deletions

View File

@ -111,7 +111,7 @@ class JanineModule(BaseModule):
if warning.id in ids: if warning.id in ids:
continue 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) body = format_warning(warning)
self.send_message(aioxmpp.JID.fromstr(jid), body) self.send_message(aioxmpp.JID.fromstr(jid), body)
@ -128,7 +128,7 @@ class JanineModule(BaseModule):
return return
bare = str(msg.from_.bare()) 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( self.send_message(
msg.from_, 'Du hast den "%s" bereits abonniert' % (landkreis) msg.from_, 'Du hast den "%s" bereits abonniert' % (landkreis)
) )
@ -147,7 +147,7 @@ class JanineModule(BaseModule):
landkreis = " ".join(cmd[1:]) landkreis = " ".join(cmd[1:])
bare = str(msg.from_.bare()) 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)) self.send_message(msg.from_, 'Du hast "%s" nicht abonniert' % (landkreis))
return return

View File

@ -10,7 +10,7 @@ setup(
license = 'GPLv3', license = 'GPLv3',
packages = find_packages(), packages = find_packages(),
install_requires = [ install_requires = [
'mira>=0.2.0', 'git+https://git.polynom.me/PapaTutuWawa/mira.git@0.3.0',
'requests>=2.23.0' 'requests>=2.23.0'
], ],
zip_safe=True zip_safe=True