diff options
author | mousebot <mousebot@riseup.net> | 2022-03-10 18:30:24 +0100 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2022-03-11 08:44:01 +0100 |
commit | b7c7bc608a0650842c3479564b85ff91031ae2d7 (patch) | |
tree | 8fca996f6f75cdc6d2cae8775ed3d1cb34eea03f | |
parent | b1318ba12165d59cc1b7ce21d3b77099a3ff78d3 (diff) |
make follow etc work on boost/fave notifs
to achieve this, in notifications--format-note, we run
notifications--insert-status on 'note' rather than 'status'
handle mentions/reblogs when following from a notif
-rw-r--r-- | lisp/mastodon-notifications.el | 18 | ||||
-rw-r--r-- | lisp/mastodon-profile.el | 6 |
2 files changed, 16 insertions, 8 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index df4f9c0..670105a 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -168,12 +168,18 @@ Status notifications are given when (status (mastodon-tl--field 'status note)) (follower (alist-get 'username (alist-get 'account note)))) (mastodon-notifications--insert-status - (if (or (equal type 'follow) - (equal type 'follow-request)) - ;; Using reblog with an empty id will mark this as something - ;; non-boostable/non-favable. - (cons '(reblog (id . nil)) note) - status) + (cond ((or (equal type 'follow) + (equal type 'follow-request)) + ;; Using reblog with an empty id will mark this as something + ;; non-boostable/non-favable. + (cons '(reblog (id . nil)) note)) + ;; reblogs/faves use 'note' to process their own json + ;; not the toot's. this ensures following etc. work on such notifs + ((or (equal type 'favourite) + (equal type 'boost)) + note) + (t + status)) (if (or (equal type 'follow) (equal type 'follow-request)) (propertize (if (equal type 'follow) diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index cb449b6..793d8f9 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -483,8 +483,10 @@ These include the author, author of reblogged entries and any user mentioned." (let ((this-account (or (alist-get 'account status) ; status is a toot status)) ; status is a user listing - (mentions (alist-get 'mentions status)) - (reblog (alist-get 'reblog status))) + (mentions (or (alist-get 'mentions (alist-get 'status status)) + (alist-get 'mentions status))) + (reblog (or (alist-get 'reblog (alist-get 'status status)) + (alist-get 'reblog status)))) (seq-filter 'stringp (seq-uniq |