diff options
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index c110fb2..84df69f 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -993,6 +993,24 @@ webapp" (mastodon-tl--goto-next-toot))) (message "No Thread!")))) +(defun mastodon-tl--create-filter (word contexts) + "Create a filter for WORD. +CONTEXTS must be a list containting at least one of \"home\", +\"notifications\", \"public\", \"thread\". " + (interactive) + (let* ((url (mastodon-http--api "filters")) + (contexts-processed + (mapcar (lambda (x) + (cons "context[]" x)) + contexts)) + (response + (mastodon-http--post url (push + `("phrase" . ,word) + contexts-processed) + nil))) + (with-current-buffer response + (switch-to-buffer (current-buffer))))) + (defun mastodon-tl--get-follow-suggestions () "Display a buffer of suggested accounts to follow." (interactive) |