Skip to content

Commit d8f25a3

Browse files
lorenzo132sebkuip
authored andcommitted
Fix: Blackformatting, workflows. Add snooze/unsnooze events. (modmail-dev#3412)
* improvements changelog.md * remove advancedmenu plugin * fix: hide privatekey from changelog This is for internal use only. * black formatting * feat: dispatch event for snoozing/unsnoozing. This allows plugin developers to create feature on snoozing/unsnoozing. * bump pipfile * Update Pipfile.lock * black formatting * sync with pipfile. --------- Co-authored-by: Sebastian <61157793+sebkuip@users.noreply.github.com>
1 parent 63ebc1f commit d8f25a3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/thread.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ async def snooze(self, moderator=None, command_used=None, snooze_for=None):
262262

263263
logging.info(f"[SNOOZE] DB update result: {result.modified_count}")
264264

265+
# Dispatch thread_snoozed event for plugins
266+
self.bot.dispatch("thread_snoozed", self, moderator, snooze_for)
267+
265268
behavior = behavior_pre
266269
if behavior == "move":
267270
# Move the channel to the snoozed category (if configured) and optionally apply a prefix
@@ -754,6 +757,9 @@ async def _ensure_genesis(force: bool = False):
754757
# Mark unsnooze as complete
755758
self._unsnoozing = False
756759

760+
# Dispatch thread_unsnoozed event for plugins
761+
self.bot.dispatch("thread_unsnoozed", self)
762+
757763
# Process queued commands
758764
await self._process_command_queue()
759765

0 commit comments

Comments
 (0)