aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-15 11:54:28 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-15 11:54:28 +0200
commit574c17c4bdfe43a3081ddcbde4452dd477929c02 (patch)
treed700370b46aeed9ea8d1c3cf8ac5424e7ecc29b3 /lisp/mastodon-profile.el
parent9aac053495a08482d04f36c258a4e11d7ec92ea4 (diff)
toot-id>item-id, toot-json>item-json, item-type for nav, byline still needed
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el34
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 365e352..9850b81 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -74,7 +74,7 @@
(autoload 'mastodon-tl--symbol "mastodon-tl")
(autoload 'mastodon-tl--timeline "mastodon-tl.el")
(autoload 'mastodon-tl--toot "mastodon-tl")
-(autoload 'mastodon-tl--toot-id "mastodon-tl")
+(autoload 'mastodon-tl--item-id "mastodon-tl")
(autoload 'mastodon-toot--count-toot-chars "mastodon-toot")
(autoload 'mastodon-toot--get-max-toot-chars "mastodon-toot")
(autoload 'mastodon-views--add-account-to-list "mastodon-views")
@@ -136,10 +136,10 @@ contains")
:keymap mastodon-profile-update-mode-map
:global nil)
-(defun mastodon-profile--toot-json ()
- "Get the next toot-json."
+(defun mastodon-profile--item-json ()
+ "Get the next item-json."
(interactive)
- (mastodon-tl--property 'toot-json))
+ (mastodon-tl--property 'item-json))
(defun mastodon-profile--make-author-buffer (account &optional no-reblogs)
"Take an ACCOUNT json and insert a user account into a new buffer.
@@ -679,7 +679,7 @@ the format \"2000-01-31T00:00:00.000Z\"."
If toot is a boost, opens the profile of the booster."
(interactive)
(mastodon-profile--make-author-buffer
- (alist-get 'account (mastodon-profile--toot-json))))
+ (alist-get 'account (mastodon-profile--item-json))))
(defun mastodon-profile--image-from-account (account img-type)
"Return a avatar image from ACCOUNT.
@@ -693,21 +693,21 @@ IMG-TYPE is the JSON key from the account data."
(interactive
(list
(if (and (not (mastodon-tl--profile-buffer-p))
- (not (mastodon-tl--property 'toot-json :no-move)))
+ (not (mastodon-tl--property 'item-json :no-move)))
(message "Looks like there's no toot or user at point?")
(let ((user-handles (mastodon-profile--extract-users-handles
- (mastodon-profile--toot-json))))
+ (mastodon-profile--item-json))))
(completing-read "View profile of user [choose or enter any handle]: "
user-handles
nil ; predicate
'confirm)))))
- (if (not (or ; own profile has no need for toot-json test:
+ (if (not (or ; own profile has no need for item-json test:
(equal user-handle (mastodon-auth--get-account-name))
(mastodon-tl--profile-buffer-p)
- (mastodon-tl--property 'toot-json :no-move)))
+ (mastodon-tl--property 'item-json :no-move)))
(message "Looks like there's no toot or user at point?")
(let ((account (mastodon-profile--lookup-account-in-status
- user-handle (mastodon-profile--toot-json))))
+ user-handle (mastodon-profile--item-json))))
(if account
(progn
(message "Loading profile of user %s..." user-handle)
@@ -733,14 +733,14 @@ Used to view a user's followers and those they're following."
(propertize
(mastodon-tl--byline-author `((account . ,toot)) :avatar)
'byline 't
- 'toot-id (alist-get 'id toot)
- 'base-toot-id (mastodon-tl--toot-id toot)
- 'toot-json toot))
+ 'item-id (alist-get 'id toot)
+ 'base-item-id (mastodon-tl--item-id toot)
+ 'item-json toot))
(mastodon-media--inline-images start-pos (point))
(insert "\n"
(propertize
(mastodon-tl--render-text (alist-get 'note toot) nil)
- 'toot-json toot)
+ 'item-json toot)
"\n")))
tootv))))
@@ -805,7 +805,7 @@ These include the author, author of reblogged entries and any user mentioned."
"Remove a user from your followers.
Optionally provide the ID of the account to remove."
(interactive)
- (let* ((account (unless id (mastodon-tl--property 'toot-json :no-move)))
+ (let* ((account (unless id (mastodon-tl--property 'item-json :no-move)))
(id (or id (alist-get 'id account)))
(handle (if account
(alist-get 'acct account)
@@ -823,10 +823,10 @@ Optionally provide the ID of the account to remove."
"Prompt for a user in the item at point and remove from followers."
(interactive)
(let* ((handles (mastodon-profile--extract-users-handles
- (mastodon-profile--toot-json)))
+ (mastodon-profile--item-json)))
(handle (completing-read "Remove from followers: " handles nil))
(account (mastodon-profile--lookup-account-in-status
- handle (mastodon-profile--toot-json)))
+ handle (mastodon-profile--item-json)))
(id (alist-get 'id account)))
(mastodon-profile--remove-user-from-followers id)))