aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2024-11-24 19:54:47 +1100
committerYuchen Pei <id@ypei.org>2024-12-22 21:47:35 +1100
commit6715c9b0e03a50e08a2ecc2dd9395fda0dded196 (patch)
tree05622bd9f4e2d248a0255707699671140bb45fcc /lisp/mastodon-tl.el
parent4077de24da84e57a313382e92242daf9be1b5b5f (diff)
Display a warning when composing a reply mentioning users from instances that have suspended you
These users would not be able to see your reply through their instances.
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 51abb6e..0fcb3a3 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -3393,6 +3393,18 @@ NO-BYLINE means just insert toot body, used for announcements."
(unless (mastodon-tl--profile-buffer-p)
(mastodon-tl--goto-first-item)))
+(defun mastodon-tl--remote-suspended-p (domain)
+ (ignore-errors
+ (alist-get 'suspended
+ (mastodon-http--get-json
+ (format "https://%s/api/v1/accounts/lookup"
+ domain )
+ `(("acct" . ,(format "%s@%s"
+ mastodon-active-user
+ (url-host
+ (url-generic-parse-url mastodon-instance-url)))))
+ t))))
+
;;; BOOKMARKS
(require 'bookmark)