aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org11
-rw-r--r--lisp/mastodon-tl.el3
-rw-r--r--lisp/mastodon-toot.el11
3 files changed, 16 insertions, 9 deletions
diff --git a/README.org b/README.org
index dfbb95c..05f80fa 100644
--- a/README.org
+++ b/README.org
@@ -358,7 +358,7 @@ PRs, issues, feature requests, and general feedback are very welcome!
(it probably does).
4. Enable debug on error (=toggle-debug-on-error=), make the bug happen again,
and copy the backtrace that appears.
-5. Open an issue here and explain what is going on.
+5. Open an issue here and explain what is going on. Provide your emacs version and what kind of server your account is on.
*** Fixes and features
@@ -367,10 +367,17 @@ PRs, issues, feature requests, and general feedback are very welcome!
3. Run the tests and ensure that your code doesn't break any of them.
4. Create a pull request referencing the issue created in step 1.
+*** coding style
+
+- This library uses an unconvential double dash (=--=) between file namespaces and function names, which contradicts normal Elisp style. This needs to be respected until the whole library is changed.
+- Use =aggressive-indent-mode= or similar to keep your code indented.
+- Single spaces end sentences in docstrings.
+- There's no need for a blank line after the first docstring line (one is added automatically when documentation is displayed).
+
** Supporting mastodon.el
If you'd like to support continued development of =mastodon.el=, I accept
-donations via paypal at martianhiatus [ at ] riseup [ dot ] net. If you would
+donations via paypal: https://paypal.me/martianh. If you would
prefer a different payment method, write to me at that address and I can
provide IBAN or other details.
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 36511ef..b7054f5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2901,7 +2901,8 @@ This location is defined by a non-nil value of
(defun mastodon-tl--get-link-header-from-response (headers)
"Get http Link header from list of http HEADERS."
(when headers
- (split-string (alist-get "Link" headers nil nil 'equal) ", ")))
+ ;; pleroma uses "link", so case-insensitive match required:
+ (split-string (alist-get "Link" headers nil nil 'cl-equalp) ", ")))
(defun mastodon-tl--init (buffer-name endpoint update-function &optional headers params)
"Initialize BUFFER-NAME with timeline targeted by ENDPOINT asynchronously.
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index bff6677..177cfdc 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -710,12 +710,11 @@ If media items have been attached and uploaded with
If `mastodon-toot--edit-toot-id' is non-nil, PUT contents to
instance to edit a toot."
(interactive)
- (let* ((edit-p (if mastodon-toot--edit-toot-id t nil))
- (toot (mastodon-toot--remove-docs))
+ (let* ((toot (mastodon-toot--remove-docs))
(scheduled mastodon-toot--scheduled-for)
(scheduled-id mastodon-toot--scheduled-id)
(endpoint
- (if edit-p
+ (if mastodon-toot--edit-toot-id
;; we are sending an edit:
(mastodon-http--api (format "statuses/%s"
mastodon-toot--edit-toot-id))
@@ -731,8 +730,8 @@ instance to edit a toot."
(symbol-name t)))
("spoiler_text" . ,spoiler)
("language" . ,mastodon-toot--language))
- ; Pleroma instances can't handle null-valued
- ; scheduled_at args, so only add if non-nil
+ ; Pleroma instances can't handle null-valued
+ ; scheduled_at args, so only add if non-nil
(when scheduled `(("scheduled_at" . ,scheduled)))))
(args-media (when mastodon-toot--media-attachments
(mastodon-http--build-array-params-alist
@@ -760,7 +759,7 @@ instance to edit a toot."
((mastodon-toot--empty-p)
(message "Empty toot. Cowardly refusing to post this."))
(t
- (let ((response (if edit-p
+ (let ((response (if mastodon-toot--edit-toot-id
;; we are sending an edit:
(mastodon-http--put endpoint args)
(mastodon-http--post endpoint args))))