aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-12-17 13:13:52 +0100
committermousebot <mousebot@riseup.net>2021-12-17 13:13:52 +0100
commit2826aef3fb36dc960fa377a5e7e3b23cbc146634 (patch)
tree901a46c993d37c599e5f1962d50e6fbfbd76adc7
parentc06776ba115c561ddb23fd9887aad1c19c5b960a (diff)
parent469974fa74e1661ea0a60cb5249ee0d3c6f640fd (diff)
Merge branch 'develop' into echo-faves-in-thread
-rw-r--r--README.org40
-rw-r--r--lisp/mastodon-toot.el53
2 files changed, 44 insertions, 49 deletions
diff --git a/README.org b/README.org
index 3a7a06e..ab2dbff 100644
--- a/README.org
+++ b/README.org
@@ -15,33 +15,34 @@ It adds the following features:
| | show a lock icon for locked accounts |
| =R=, =C-c a=, =C-c r= | view/accept/reject follow requests |
| =V= | view your favorited toots |
-| =K= | view your bookmarked toots |
| =i= | toggle pinning of toots |
| =S-C-P= | jump to your profile |
| =U= | update your profile bio note |
| Notifications: | |
| | follow requests now also appear in notifications |
| =a=, =r= | accept/reject follow requests |
+| | notifications for when a user posts (optional) |
| Timelines: | |
| =C= | copy url of toot at point |
| =d= | delete your toot at point, and reload current timeline |
| =D= | delete and redraft toot at point, preserving reply/CW/visibility |
| =W=, =M=, =B= | (un)follow, (un)mute, (un)block author of toot at point |
-| =k= | toggle bookmark of toot at point |
-| | display polls and vote on polls (pretty basic for now) |
+| =k=, =K= | toggle bookmark of toot at point, view bookmarked toots |
+| | display polls and vote on them |
| | images are links to the full image, can be zoomed/rotated/saved (see image keymap) |
| | images scale properly |
| | toot visibility (direct, followers only) icon appears in toot bylines |
| | display a toot's favorites, boosts and replies count in thread view |
+| | customize option to cache images |
| Toots: | |
| | mention booster in replies by default |
-| | autocompletion of mentions, via company-mode (must be installed to work) |
-| =C-c C-a= | media uploads |
-| | media uploads previews in toot compose buffer |
+| | replies preserve visibility status/CW of original toot |
+| | autocompletion of user mentions, via =company-mode= (must be installed to work) |
+| =C-c C-a= | media uploads, asynchronous |
+| | media upload previews displayed in toot compose buffer |
| =C-c C-n= | and sensitive media/nsfw flag |
| =C-c C-e= | add emoji (if =emojify= installed) |
| | download and use your instance's custom emoji |
-| | replies preserve visibility status/CW of original toot |
| | server's maximum toot length shown in toot compose buffer |
| Search: | |
| =S= | search (posts, users, tags) (NB: only posts you have interacted with are searched) |
@@ -73,27 +74,16 @@ This repo also incorporates fixes for two bugs that were never merged into the u
- https://github.com/jdenen/mastodon.el/issues/227 (and https://github.com/jdenen/mastodon.el/issues/234)
- https://github.com/jdenen/mastodon.el/issues/228
-** roadmap-ish
-
-I might add a few more features if the ones I added turn out to work ok. Possible additions/amendments:
-
-- [X] update profile note.
-- [X] fix loading more notifications re-loads the same ones
-- [X] view/accept/reject follow requests in notifications view.
-- [X] fix sometimes usernames don't appear in timelines
-- [X] voting on polls
-- [X] delete and redraft toots
-- [X] prevent loss of draft toots by the toot-send bug
-- [X] fix scaling of images
-- [X] display post visibility status in timelines
-- [X] caching of images / avatars
-- better display of polls
-- [X] display number of boosts/faves in toot byline
-- mention all thread participants in replies
-- [X] improve (or even partially disable) async.
+** 2FA
It looks like 2-factor auth was never completed in the original repo. It's not a priority for me, auth ain't my thing. If you want to hack on it, its on the develop branch in the original repo.
+** contributing
+
+Contributions are welcome. Registration is disabled by default on the gitea instance, but if you are interested, get in touch with me on mastodon:
+
+[[https://todon.nl/@mousebot][@mousebot@todon.nl]]
+
* Original README
** Installation
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 8d2df60..2ff7f83 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -468,24 +468,27 @@ If media items have been attached and uploaded with
(symbol-name t)))
("spoiler_text" . ,spoiler)))
(args-media (when mastodon-toot--media-attachments
- (if (= (length mastodon-toot--media-attachments)
- (length mastodon-toot--media-attachment-ids))
- ;; (mastodon-toot--upload-attached-media)
- ;; moved upload to mastodon-toot--attach-media
(mapcar (lambda (id)
(cons "media_ids[]" id))
- mastodon-toot--media-attachment-ids)
- (message "Looks like something went wrong with your uploads. Maybe you want to try again."))))
+ mastodon-toot--media-attachment-ids)))
(args (append args-media args-no-media)))
- (if (> (length toot) (string-to-number mastodon-toot--max-toot-chars))
- (message "Looks like your toot is longer than that maximum allowed length.")
- (if empty-toot-p
- (message "Empty toot. Cowardly refusing to post this.")
- (let ((response (mastodon-http--post endpoint args nil)))
- (mastodon-http--triage response
- (lambda ()
- (mastodon-toot--kill)
- (message "Toot toot!"))))))))
+ (cond ((and mastodon-toot--media-attachments
+ ;; make sure we have media args
+ ;; and the same num of ids as attachments
+ (or (not args-media)
+ (not (= (length mastodon-toot--media-attachments)
+ (length mastodon-toot--media-attachment-ids)))))
+ (message "Something is wrong with your uploads. Wait for them to complete or try again."))
+ ((> (length toot) (string-to-number mastodon-toot--max-toot-chars))
+ (message "Looks like your toot is longer than that maximum allowed length."))
+ (empty-toot-p
+ (message "Empty toot. Cowardly refusing to post this."))
+ (t
+ (let ((response (mastodon-http--post endpoint args nil)))
+ (mastodon-http--triage response
+ (lambda ()
+ (mastodon-toot--kill)
+ (message "Toot toot!"))))))))
(defun mastodon-toot--process-local (acct)
"Add domain to local ACCT and replace the curent user name with \"\".
@@ -629,15 +632,17 @@ File is actually attached to the toot upon posting."
(when (>= (length mastodon-toot--media-attachments) 4)
;; Only a max. of 4 attachments are allowed, so pop the oldest one.
(pop mastodon-toot--media-attachments))
- (setq mastodon-toot--media-attachments
- (nconc mastodon-toot--media-attachments
- `(((:contents . ,(mastodon-http--read-file-as-string file))
- (:content-type . ,content-type)
- (:description . ,description)
- (:filename . ,file)))))
- (mastodon-toot--refresh-attachments-display)
- ;; upload only most recent attachment:
- (mastodon-toot--upload-attached-media (car (last mastodon-toot--media-attachments))))
+ (if (file-directory-p file)
+ (message "Looks like you chose a directory not a file.")
+ (setq mastodon-toot--media-attachments
+ (nconc mastodon-toot--media-attachments
+ `(((:contents . ,(mastodon-http--read-file-as-string file))
+ (:content-type . ,content-type)
+ (:description . ,description)
+ (:filename . ,file)))))
+ (mastodon-toot--refresh-attachments-display)
+ ;; upload only most recent attachment:
+ (mastodon-toot--upload-attached-media (car (last mastodon-toot--media-attachments)))))
(defun mastodon-toot--upload-attached-media (attachment)
"Upload a single attachment using `mastodon-http--post-media-attachment'.