Skip to content

Commit

Permalink
zephyr: Delete DMs after they are received.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmv authored and timabbott committed Aug 13, 2024
1 parent e9d8ef3 commit 43a4900
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zulip/integrations/zephyr/check-mirroring
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ if "error" in res["result"]:
logging.error(res["msg"])
print_status_and_exit(1)
messages = [event["message"] for event in res["events"]]
for m in messages:
if m.get("stream_id") is None:
# Non-stream messages can't have a retention policy, so clean
# them up so they don't pile up
zulip_client.delete_message(m["id"])
logger.info("Finished receiving Zulip messages!")

receive_zephyrs()
Expand Down

0 comments on commit 43a4900

Please sign in to comment.