aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mastodon-http.el7
-rw-r--r--lisp/mastodon-search.el2
-rw-r--r--lisp/mastodon-tl.el4
-rw-r--r--lisp/mastodon-toot.el6
4 files changed, 13 insertions, 6 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 8298cec..8a7499f 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -31,6 +31,7 @@
(require 'json)
(require 'request) ; for attachments upload
+
(defvar mastodon-instance-url)
(autoload 'mastodon-auth--access-token "mastodon-auth")
@@ -209,10 +210,10 @@ The upload is asynchronous. On succeeding, `mastodon-toot--media-attachment-ids'
(200
(request-response-data response))
(401
- (error "Unauthorized: The access token is invalid."))
+ (error "Unauthorized: The access token is invalid"))
(422
- (error "Unprocessable entity: file or file type is unsupported or invalid."))
- (_ (error "Shit went south.")))))
+ (error "Unprocessable entity: file or file type is unsupported or invalid"))
+ (_ (error "Shit went south")))))
(provide 'mastodon-http)
;;; mastodon-http.el ends here
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index 5a98b26..408b887 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -39,6 +39,8 @@
(autoload 'mastodon-auth--access-token "mastodon-auth")
(defvar mastodon-instance-url)
+(defvar mastodon-tl--link-keymap)
+
(defconst mastodon-http--timeout 5)
(defun mastodon-search--search-query (query)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 298964d..dac3e66 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -48,6 +48,10 @@
(autoload 'mastodon-profile--extract-users-handles "mastodon-profile.el")
(autoload 'mastodon-profile--my-profile "mastodon-profile.el")
(autoload 'mastodon-toot--delete-toot "mastodon-toot")
+(autoload 'mastodon-http--post "mastodon-http")
+(autoload 'mastodon-http--triage "mastodon-http")
+(autoload 'mastodon-http--get-json-async "mastodon-http")
+(autoload 'mastodon-profile--lookup-account-in-status "mastodon-profile")
(defvar mastodon-instance-url)
(defvar mastodon-toot-timestamp-format)
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index cc65597..c507384 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -44,6 +44,8 @@
(autoload 'mastodon-tl--property "mastodon-tl")
(autoload 'mastodon-tl--find-property-range "mastodon-tl")
(autoload 'mastodon-toot "mastodon")
+(autoload 'mastodon-http--post-media-attachment "mastodon-http")
+(autoload 'mastodon-tl--toot-id "mastodon-tl")
(defgroup mastodon-toot nil
"Tooting in Mastodon."
@@ -187,8 +189,6 @@ Remove MARKER if REMOVE is non-nil, otherwise add it."
"Pin or unpin user's toot at point."
(interactive)
(let* ((toot (mastodon-tl--property 'toot-json))
- (id (mastodon-tl--as-string (mastodon-tl--toot-id toot)))
- (url (mastodon-http--api (format "statuses/%s/pin" id)))
(pinnable-p (and
(not (cdr (assoc 'reblog toot)))
(equal (cdr (assoc 'acct
@@ -249,7 +249,7 @@ Remove MARKER if REMOVE is non-nil, otherwise add it."
(buffer-substring (cdr header-region) (point-max))))
(defun mastodon-toot--set-visibility (visibility)
- "Sets the visiblity of the next toot"
+ "Sets the visiblity of the next toot to VISIBILITY."
(interactive
(list (completing-read "Visiblity: " '("public"
"unlisted"