Fix issue when webhook is switched to on with RC

This commit is contained in:
Frisk 2020-08-11 20:15:25 +02:00
parent 931aec8377
commit c40beecf43
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -233,7 +233,7 @@ async def scan_group(group: str):
continue continue
if extended: if extended:
await process_mwmsgs(recent_changes_resp, local_wiki, mw_msgs) await process_mwmsgs(recent_changes_resp, local_wiki, mw_msgs)
if local_wiki.rc_active in (0, None): # new wiki, just get the last rc to not spam the channel if local_wiki.rc_active in (0, None, -1): # new wiki, just get the last rc to not spam the channel, -1 for -1 to NULL changes
if len(recent_changes) > 0: if len(recent_changes) > 0:
local_wiki.rc_active = recent_changes[-1]["rcid"] local_wiki.rc_active = recent_changes[-1]["rcid"]
DBHandler.add(queued_wiki.url, recent_changes[-1]["rcid"]) DBHandler.add(queued_wiki.url, recent_changes[-1]["rcid"])