diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-10-16 13:53:06 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-10-16 13:53:06 +0200 |
commit | d573d80f023813ce4c429dc73da6714b0a29af8c (patch) | |
tree | 72055548f91b14e712bebecda9bf9ab28f929230 /lisp/mastodon-notifications.el | |
parent | f114f3c19066e5bd7211389e6730b23a17c35e09 (diff) |
notifs: string-trim action authors
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r-- | lisp/mastodon-notifications.el | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 599b4aa..fc82edd 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -380,29 +380,30 @@ When COMPACT, just display username, not also handle." (let ((total (alist-get 'notifications_count group)) (accts 2)) (concat - (cl-loop - for account in accounts - repeat accts - concat - (let-alist account - (concat - ;; avatar insertion moved up to `mastodon-tl--byline' by - ;; default to be outside 'byline propt. - (when (and avatar ; used by `mastodon-profile--format-user' - mastodon-tl--show-avatars - mastodon-tl--display-media-p - (mastodon-tl--image-trans-check)) - (mastodon-media--get-avatar-rendering .avatar)) - (let ((uname (mastodon-tl--byline-username toot account)) - (handle (concat - " (" - (mastodon-tl--byline-handle toot nil account) - ")"))) - (if compact - ;; FIXME: this doesn't work to make a link from a username: - (propertize handle 'display uname) - (concat uname handle))) - "\n"))) ;; FIXME: only if not last handle + (string-trim ;; remove trailing newline + (cl-loop + for account in accounts + repeat accts + concat + (let-alist account + (concat + ;; avatar insertion moved up to `mastodon-tl--byline' by + ;; default to be outside 'byline propt. + (when (and avatar ; used by `mastodon-profile--format-user' + mastodon-tl--show-avatars + mastodon-tl--display-media-p + (mastodon-tl--image-trans-check)) + (mastodon-media--get-avatar-rendering .avatar)) + (let ((uname (mastodon-tl--byline-username toot account)) + (handle (concat + " (" + (mastodon-tl--byline-handle toot nil account) + ")"))) + (if compact + ;; FIXME: this doesn't work to make a link from a username: + (propertize handle 'display uname) + (concat uname handle))) + "\n")))) (if (< accts total) (let ((diff (- total accts))) ;; FIXME: help echo all remaining accounts? |