diff --git a/src/scheduled-events.lisp b/src/scheduled-events.lisp index cd0ff76..38f9c97 100644 --- a/src/scheduled-events.lisp +++ b/src/scheduled-events.lisp @@ -67,9 +67,7 @@ (gen-scheduler-function (look-for-announcements +announcements-check-frequency+) - (when *thread-window* - (ui:notify (_ "Looking for announcements…")) - (program-events:push-event (make-instance 'program-events:check-announcements-event)))) + (%look-for-announcements)) (gen-at-boot-function purge-history (db:purge-history)) @@ -81,6 +79,14 @@ (gen-at-boot-function sync-gempub-library (gempub:sync-library :notify t)) +(defun %look-for-announcements () + (when *thread-window* + (ui:notify (_ "Looking for announcements…")) + (program-events:push-event (make-instance 'program-events:check-announcements-event)))) + +(gen-at-boot-function look-for-announcement-on-boot + (%look-for-announcements)) + (defun run-scheduled-events (ticks) (when (api-pleroma:instance-pleroma-p) (refresh-all-chats-messages ticks) @@ -91,4 +97,5 @@ (purge-gemlog-entries ticks) (purge-history) (refresh-gemlog-posts) - (sync-gempub-library)) + (sync-gempub-library) + (look-for-announcement-on-boot))