Commit graph

6 commits

Author SHA1 Message Date
Mish
14784f77d1
Preparation for improving the daily summary message (#124)
* Add lastMsgAt and lastMsgBy to DB

* Keep track of the last messages in threads

* Add UserType enum to schema

* Make both of the new fields optional

* Add data/ to .gitignore

* Only include users who have resolved tickets on the overall leaderboard

Fixes #96

* Fix docstring
2025-11-29 11:25:49 +00:00
MMK21
bed6f313ca
Overhaul deleted message handling (#73)
* Update DB when unthreaded messages are deleted

* Add required library libatomic1 to Dockerfile (#71)

* Handle quick message deletions

This is a quick and dirty way to handle the bug, but it works.

I also realised that handle_question_deletion() doesn't delete it in #tickets

* Create a system for tracking bot messages attached to tickets

* Ensure resolved message is added to userFacingMsgs

TODO I''ll need to make a function that all the macros can use to send a user-facing message

* Add a reply_to_ticket() helper for updating the DB
while replying to a ticket

* Fix type errors in reply_to_ticket()

* Use reply_to_ticket when resolving tickets

* Fix type errors in message.py

* Create delete_replies_to_ticket()

* Remove unused parameter in delete_replies_to_ticket

* Rename BotMessage.msgTs to BotMessage.ts

* Write a stub delete_and_clean_up_ticket function

* Partially implement delete_and_clean_up_ticket

* Delete "ticket" message in delete_and_clean_up_ticket()

* Use the new ticket methods where appropriate

* Make function name clearer ("delete_bot_replies")

* Log if a question is deleted but not present in DB

* Fix error when normal messages are deleted

* Actually include userFacingMsgs in the query when deleting bot replies

* Add success heartbeat to delete queue

* Document the deletion queue needing workspace admin

* Don't use delete queue in ticket_methods.py

This is because the delete queue requires an admin token, ew

* Fix deleting the backend message on ticket deletion

* Always preserve support threads with >3 bot messages

This is so that if someone runs ?faq, the ticket still counts as being resolved in the DB.

* Debug-log message event data instead of printing

* Use the reply_to_ticket util in macros

---------

Co-authored-by: RandomSearch <101704343+RandomSearch18@users.noreply.github.com>
2025-10-25 07:52:21 +00:00
Amber
97ab78808a
daily stats 2025-06-19 23:20:54 +01:00
Sarah
2978d89dc6 update schema 2025-06-16 12:14:57 +01:00
Amber
3561b91301
much done, worky 2025-06-13 19:26:10 +01:00
Amber
4f3a8a1aae
functional bot 2025-06-09 19:36:48 +01:00