1
0
Fork 0

- [fediverse] ensured :follow-request and :mentions are kept on the server when deleting noticfications.

This commit is contained in:
cage 2024-09-07 19:29:54 +02:00
parent 43eeb4c613
commit d551505165
1 changed files with 8 additions and 5 deletions

View File

@ -820,12 +820,15 @@ numerical indices identifying the option voting for"
:status
:update))
(defun notifications (max-id
&optional
(excluded-types (remove-if (lambda (a)
(defun safe-to-delete-notifications-type ()
(remove-if (lambda (a)
(member a
'(:mention :follow-request)))
*all-notification-types*)))
*all-notification-types*))
(defun notifications (max-id
&optional
(excluded-types (safe-to-delete-notifications-type)))
"Get the latest mentions, starting from `max-id` (pass nil to get
the latest 15 mentions)."
(get-notifications :max-id max-id
@ -871,7 +874,7 @@ the latest 15 mentions)."
notifications-so-far))
(defun delete-all-notifications (&optional (progress-fn nil))
(when-let ((notifications (all-notifications nil)))
(when-let ((notifications (all-notifications (safe-to-delete-notifications-type))))
(loop for notification in notifications do
(delete-notification (tooter:id notification))
(when (functionp progress-fn)