From e23ef05fabe038396875c118101847d69e5de7f6 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 27 Nov 2022 10:35:07 +0100 Subject: add fun mastodon-tl--dm-user --- lisp/mastodon-tl.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index a5b5ed7..53ab57a 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2175,6 +2175,16 @@ LANGS is the accumulated array param alist if we re-run recursively." (message "Looks like you have no mutes to unmute!") (mastodon-tl--do-user-action-and-response user-handle "unmute" t))) +(defun mastodon-tl--dm-user (user-handle) + "Query for USER-HANDLE from current status and compose a message to that user." + (interactive + (list + (mastodon-tl--interactive-user-handles-get "message"))) + (mastodon-tl--do-if-toot + (mastodon-toot--compose-buffer (concat "@" user-handle)) + (setq mastodon-toot--visibility "direct") + (mastodon-toot--update-status-fields))) + (defun mastodon-tl--interactive-user-handles-get (action) "Get the list of user-handles for ACTION from the current toot." (mastodon-tl--do-if-toot -- cgit v1.2.3