aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-transient.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-transient.el')
-rw-r--r--lisp/mastodon-transient.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mastodon-transient.el b/lisp/mastodon-transient.el
index bbc8bc2..946d28a 100644
--- a/lisp/mastodon-transient.el
+++ b/lisp/mastodon-transient.el
@@ -28,6 +28,9 @@
;;; UTILS
+;; some JSON fields that are returned under the "source" field need to be
+;; sent back in the format source[key], while some others are sent kust as
+;; key:
(defun mastodon-transient-parse-source-key (key)
"Parse mastodon source KEY.
If KEY needs to be source[key], format like so, else just return
@@ -54,7 +57,7 @@ the inner key part."
;; fields utils:
;; to PATCH fields, we just need fields[x][name] and fields[x][value]
-(defun mastodon-transient-fields-to-transient (fields)
+(defun mastodon-transient--fields-alist (fields)
"Convert fields in FIELDS to numbered conses.
The keys in the data are not numbered, so we convert the key into
the format fields.X.keyname."
@@ -161,7 +164,7 @@ the format fields.X.keyname."
"Fetch profile fields (metadata)."
(tp-return-data #'mastodon-transient-get-creds nil 'fields)
(setq tp-server-settings
- (mastodon-transient-fields-to-transient tp-server-settings)))
+ (mastodon-transient--fields-alist tp-server-settings)))
(transient-define-prefix mastodon-profile-fields ()
"A transient for setting profile fields."