aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@disroot.org>2024-10-30 08:17:07 +0100
committermarty hiatt <martianhiatus@disroot.org>2024-10-30 08:22:49 +0100
commit7d61f38a6bbe8a329892c5e91d1627a3ab03ee66 (patch)
treedf7836301ece902a03a8ee4e3cac041a18d17b54 /lisp
parentb529690f96953cd9b0ab248b18d811b9e95d0890 (diff)
FIX #609. insert-status remove author-byline arg, its always the same function
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-notifications.el11
-rw-r--r--lisp/mastodon-tl.el16
2 files changed, 12 insertions, 15 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 97d0d80..6d6b339 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -273,8 +273,6 @@ JSON is a list of alists."
;; (propertize
;; (mastodon-notifications--comment-note-text body)))
;; (t body)))
- ;; author-byline
- #'mastodon-tl--byline-author
;; action-byline
(unless (member type '(follow follow_request mention))
(downcase
@@ -323,8 +321,6 @@ ACCOUNTS is data of the accounts that have reacted to the notification."
;; body
(mastodon-notifiations--body-arg
type filters status profile-note follower-name group)
- ;; author-byline
- #'mastodon-tl--byline-author
;; action-byline
(unless (member type '(follow follow_request mention))
(downcase
@@ -379,7 +375,7 @@ FILTERS STATUS PROFILE-NOTE FOLLOWER-NAME GROUP."
(t body))))
(defun mastodon-notifications--insert-note
- (toot body author-byline action-byline action-authors action-symbol
+ (toot body action-byline action-authors action-symbol
&optional base-toot unfolded group accounts type)
"Display the content and byline of timeline element TOOT.
BODY will form the section of the toot above the byline.
@@ -420,7 +416,10 @@ ACCOUNTS is the notification accounts data."
"\n"
;; actual byline:
(mastodon-tl--byline
- toot author-byline nil nil base-toot group
+ toot nil nil base-toot group
+ ;; FIXME: remove account arg (esp. if we have type). maybe we need
+ ;; type arg when we step from notifs (here); to tl--byline land
+ ;; (there):
(when (member type '("follow" "follow_request"))
toot) ;; account data!
;; types listed here use base item timestamp, else we use group's
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 4f77f92..61014ff 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -796,7 +796,7 @@ LETTER is a string, F for favourited, B for boosted, or K for bookmarked."
(image-type-available-p 'imagemagick)
(image-transforms-p)))
-(defun mastodon-tl--byline (toot author-byline &optional detailed-p
+(defun mastodon-tl--byline (toot &optional detailed-p
domain base-toot group account ts type)
"Generate byline for TOOT.
AUTHOR-BYLINE is a function for adding the author portion of
@@ -861,7 +861,7 @@ TS is a timestamp from the server, if any."
;; NB: action-byline (boost) is now added in insert-status, so no
;; longer part of the byline.
;; (base) author byline:
- (funcall author-byline toot nil domain :base account)
+ (mastodon-tl--byline-author toot nil domain :base account)
;; visibility:
(cond ((string= visibility "direct")
(propertize (concat " " (mastodon-tl--symbol 'direct))
@@ -1654,7 +1654,7 @@ Runs `mastodon-tl--render-text' and fetches poll or media."
(string= reply-to-id prev-id)))
(defun mastodon-tl--insert-status
- (toot body author-byline action-byline &optional id base-toot
+ (toot body action-byline &optional id base-toot
detailed-p thread domain unfolded no-byline)
"Display the content and byline of timeline element TOOT.
BODY will form the section of the toot above the byline.
@@ -1709,8 +1709,7 @@ NO-BYLINE means just insert toot body, used for folding."
"\n"
(if no-byline
""
- (mastodon-tl--byline toot author-byline detailed-p
- domain base-toot)))
+ (mastodon-tl--byline toot detailed-p domain base-toot)))
'item-type 'toot
'item-id (or id ; notification's own id
(alist-get 'id toot)) ; toot id
@@ -1792,10 +1791,9 @@ NO-BYLINE means just insert toot body, used for folding."
(if (and filtered (assoc "hide" filters))
nil ;; no insert
(mastodon-tl--insert-status
- toot
- (mastodon-tl--clean-tabs-and-nl spoiler-or-content)
- #'mastodon-tl--byline-author #'mastodon-tl--byline-boost
- nil nil detailed-p thread domain unfolded no-byline))))
+ toot (mastodon-tl--clean-tabs-and-nl spoiler-or-content)
+ #'mastodon-tl--byline-boost nil nil detailed-p
+ thread domain unfolded no-byline))))
(defun mastodon-tl--timeline (toots &optional thread domain no-byline)
"Display each toot in TOOTS.