From 6715c9b0e03a50e08a2ecc2dd9395fda0dded196 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sun, 24 Nov 2024 19:54:47 +1100 Subject: 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. --- lisp/mastodon-tl.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lisp/mastodon-tl.el') 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) -- cgit v1.2.3