1
0
Fork 0

- removed possible infinite loop when getting many notification (the exact number depends from from the server configuration, usually more then 15 notifications would remove the exit condition of the loop).

Thanks to the fediverse! :-)
This commit is contained in:
cage 2024-08-04 23:10:18 +02:00
parent b3d7d47f10
commit e24f9f2911
1 changed files with 1 additions and 2 deletions

View File

@ -857,9 +857,8 @@ the latest 15 mentions)."
(labels ((%notifications ()
(when-let* ((min-id (tooter:id (first notifications-so-far)))
(notifications (sort-id< (notifications min-id excluded-types))))
(loop for notification in notifications do
(when (find notification notifications-so-far :test (make-id=))
(when (not (find notification notifications-so-far :test (make-id=)))
(hooks:run-hook 'hooks:*after-getting-fediverse-notification*
notification)
(push notification notifications-so-far)))