git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b79b3da
)
Try harder to identify previously-posted announcements.
author
CMDR furrycat
<elite@furrycat.net>
Fri, 11 Nov 2016 11:09:01 +0000
(11:09 +0000)
committer
CMDR furrycat
<elite@furrycat.net>
Fri, 11 Nov 2016 11:09:01 +0000
(11:09 +0000)
plugin/announcements/announcements.py
patch
|
blob
|
history
diff --git
a/plugin/announcements/announcements.py
b/plugin/announcements/announcements.py
index
f7c76bf
..
ec47595
100644
(file)
--- a/
plugin/announcements/announcements.py
+++ b/
plugin/announcements/announcements.py
@@
-830,7
+830,7
@@
class Announcements(DBConnection):
logs = yield from client.logs_from(channel, limit = bot.get('message_limit'))
for message in logs:
raw = re.sub(r'^(<?@\S+\s)+', '', message.content).strip()
- if
bot.digest(raw) == digest
:
+ if
digest in [bot.digest(message.content), bot.digest(raw)]
:
log.debug('Saw previously posted announcement {} with digest {}'.format(announcement['id'], digest))
already_posted = True
break