branch: elpa/mastodon
commit 1ac040c113c061c173206658657cdee708001471
Merge: cf02f21a22a b920a7b9c78
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    Merge branch 'develop'
---
 lisp/mastodon-notifications.el | 25 +++++++++++++++++++++----
 lisp/mastodon-tl.el            | 10 +++++++---
 lisp/mastodon.el               |  2 +-
 3 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index e21aad30339..113f3a5908a 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -105,7 +105,8 @@
 (defvar mastodon-notifications--types
   '("all" "favourite" "reblog" "mention" "poll"
     "follow_request" "follow" "status" "update"
-    "severed_relationships" "moderation_warning")
+    "severed_relationships" "moderation_warning" "quote"
+    "quoted_update")
   "A list of notification types according to their name on the server, plus 
\"all\".")
 
 (defvar mastodon-notifications--filter-types-alist
@@ -117,7 +118,9 @@
     ("follow_request"         . mastodon-notifications-get-follow-requests)
     ("follow"                 . mastodon-notifications-get-follows)
     ("status"                 . mastodon-notifications-get-statuses)
-    ("update"                 . mastodon-notifications-get-edits))
+    ("update"                 . mastodon-notifications-get-edits)
+    ("quote"                  . mastodon-notifications-get-quotes)
+    ("quoted_update"          . mastodon-notifications-get-quoted-updates))
   "An alist of notification types and their corresponding load functions.
 Notification types are named according to their name on the server.")
 
@@ -129,7 +132,16 @@ Notification types are named according to their name on 
the server.")
     ("Posted a poll"        . "that has now ended")
     ("Requested to follow"  . "you")
     ("Posted"               . "a post")
-    ("Edited"               . "their post"))
+    ("Edited"               . "their post")
+    ("Quoted"               . "your post")
+    ;; FIXME: this is very annoying, but because "Edited" is used above,
+    ;; we cannot reuse it here. I think this is because we use
+    ;; `mastodon-notifications--action-alist' to go from (server) notif
+    ;; type, to a string, and then use that string to get the rest of the
+    ;; byline string from `mastodon-notifications--response-alist' here.
+    ;; Ideally would just key the two strings according to notif type,
+    ;; even if they did need to be gathered separately and combined.
+    ("Modified"             . "a post that you quoted"))
   "Alist of subjects for notification types.")
 
 (defvar mastodon-notifications--action-alist
@@ -142,7 +154,9 @@ Notification types are named according to their name on the 
server.")
     (poll                  . "Posted a poll")
     (update                . "Edited")
     (severed_relationships . "Relationships severed")
-    (moderation_warning    . "Moderation warning"))
+    (moderation_warning    . "Moderation warning")
+    (quote                 . "Quoted")
+    (quoted_update         . "Modified"))
   "Action strings keyed by notification type.
 Types are those of the Mastodon API.")
 
@@ -455,6 +469,9 @@ TYPE is notification type, used for non-group notifs."
        (propertize body ;; body only
                    'toot-body t) ;; includes newlines etc. for folding
        "\n"
+       ;; display quoted post:
+       (when (alist-get 'quote toot)
+         (mastodon-tl--insert-quoted (alist-get 'quote toot)))
        ;; actual byline:
        (if (member type '("severed_relationships" "moderation_warning"))
            (propertize
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index b0932fe2dc5..0a14fa242f5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -159,7 +159,7 @@ nil."
   :type 'boolean)
 
 (defcustom mastodon-tl--symbols
-  '((reply                 . ("💬" . "R"))
+  `((reply                 . ("💬" . "R"))
     (boost                 . ("🔁" . "B"))
     (reblog                . ("🔁" . "B")) ;; server compat
     (favourite             . ("⭐" . "F"))
@@ -172,14 +172,18 @@ nil."
     (direct                . ("✉" . "[direct]"))
     (edited                . ("✍" . "[edited]"))
     (update                . ("✍" . "[edited]")) ;; server compat
-    (status                . ("✍" . "[posted]"))
+    (status                . ("🔔" . "[posted]"))
     (replied               . ("⬇" . "↓"))
     (reply-bar             . ("┃" . "|"))
     (poll                  . ("📊" . "[poll]"))
     (follow                . ("👤" . "+"))
     (follow_request        . ("👤" . "+"))
     (severed_relationships . ("🔗" . "//"))
-    (moderation_warning    . ("⚠" . "!!")))
+    (moderation_warning    . ("⚠" . "!!"))
+    (quote                 . (,(propertize "“" 'face
+                                           '(t :inherit success :weight bold
+                                               :height 1.8))))
+    (quoted_update         . ("✍" . "[edited]")))
   "A set of symbols (and fallback strings) to be used in timeline.
 If a symbol does not look right (tofu), it means your
 font settings do not support it."
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 716a0db4d8c..4fc821a6860 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -6,7 +6,7 @@
 ;; Author: Johnson Denen <[email protected]>
 ;;         Marty Hiatt <[email protected]>
 ;; Maintainer: Marty Hiatt <[email protected]>
-;; Version: 2.0.6
+;; Version: 2.0.7
 ;; Package-Requires: ((emacs "28.1") (persist "0.8") (tp "0.7"))
 ;; Homepage: https://codeberg.org/martianh/mastodon.el
 

Reply via email to