mirror of https://codeberg.org/cage/tinmop/
- checked for tags and languages in the parent status if it is non
null, when filtering out statuses; - ensured the post containing mentions is saved also in the home timeline. Pleroma provides status that mentions the user in the home timeline whilst mastodon does not. The code manually copy each status with mention in the local home timeline when using tinmop with a mastodon instance.
This commit is contained in:
parent
e380310d9d
commit
3e3f2b1f3c
|
@ -839,7 +839,10 @@ the latest 15 mentions)."
|
|||
(tooter:account-name (tooter:account notification)))))
|
||||
(tui:make-tui-string raw-text)))
|
||||
|
||||
(defun update-mentions-folder (&key (delete-mentions-on-server t) (collect-threads t))
|
||||
(defun update-mentions-folder (&key
|
||||
(delete-mentions-on-server t)
|
||||
(collect-threads t)
|
||||
(save-mentions-in-home nil))
|
||||
(let ((trees '()))
|
||||
(when-let* ((all-mentions (all-mentions))
|
||||
(statuses (loop for mention in all-mentions
|
||||
|
@ -853,16 +856,24 @@ the latest 15 mentions)."
|
|||
do
|
||||
(pushnew node trees)))
|
||||
(setf trees statuses))
|
||||
(let ((event (make-instance 'program-events:save-timeline-in-db-event
|
||||
:payload trees
|
||||
:timeline-type db:+home-timeline+
|
||||
:folder db:+mentions-status-folder+
|
||||
:localp t
|
||||
:min-id nil)))
|
||||
(let ((event-save-in-mention-folder (make-instance 'program-events:save-timeline-in-db-event
|
||||
:payload trees
|
||||
:timeline-type db:+home-timeline+
|
||||
:folder db:+mentions-status-folder+
|
||||
:localp t
|
||||
:min-id nil))
|
||||
(event-save-in-home-folder (make-instance 'program-events:save-timeline-in-db-event
|
||||
:payload trees
|
||||
:timeline-type db:+home-timeline+
|
||||
:folder db:+default-status-folder+
|
||||
:localp t
|
||||
:min-id nil)))
|
||||
(when delete-mentions-on-server
|
||||
(loop for mention in all-mentions do
|
||||
(delete-notification (tooter:id mention))))
|
||||
(program-events:push-event event)
|
||||
(program-events:push-event event-save-in-mention-folder)
|
||||
(when save-mentions-in-home
|
||||
(program-events:push-event event-save-in-home-folder))
|
||||
all-mentions))))
|
||||
|
||||
(defun expand-status-thread (status-id timeline folder force-saving-of-ignored-status-p)
|
||||
|
|
|
@ -467,12 +467,16 @@
|
|||
statuses))))
|
||||
(dbg "statuses ~a" dump))
|
||||
(loop for status in statuses do
|
||||
(let ((account-id (tooter:id (tooter:account status)))
|
||||
(status-id (tooter:id status))
|
||||
(language (tooter:language status))
|
||||
(rebloggedp (tooter:parent status))
|
||||
(tags (db::concat-tags status))
|
||||
(skip-this-status nil))
|
||||
(let* ((account-id (tooter:id (tooter:account status)))
|
||||
(status-id (tooter:id status))
|
||||
(rebloggedp (tooter:parent status))
|
||||
(language (if rebloggedp
|
||||
(tooter:language (tooter:parent status))
|
||||
(tooter:language status)))
|
||||
(tags (if rebloggedp
|
||||
(db::concat-tags (tooter:parent status))
|
||||
(db::concat-tags status)))
|
||||
(skip-this-status nil))
|
||||
(when force-saving-of-ignored-status-p
|
||||
(db:remove-from-status-ignored status-id folder timeline-type))
|
||||
(when (or (and (db:user-ignored-p account-id)
|
||||
|
@ -1088,7 +1092,8 @@
|
|||
(let ((delete-fetched-mentions-required (swconf:config-delete-fetched-mentions-p)))
|
||||
(when-let* ((mentions (api-client:update-mentions-folder
|
||||
:delete-mentions-on-server delete-fetched-mentions-required
|
||||
:collect-threads nil))
|
||||
:collect-threads nil
|
||||
:save-mentions-in-home (not (api-pleroma:instance-pleroma-p))))
|
||||
(mentions-count (length mentions))
|
||||
(thread-window specials:*thread-window*))
|
||||
(when command-line:*notify-mentions*
|
||||
|
|
Loading…
Reference in New Issue