diff options
author | Dmitry Osipov <dosipov@microsoft.com> | 2022-12-01 21:21:41 +0100 |
---|---|---|
committer | Dmitry Osipov <dosipov@microsoft.com> | 2022-12-01 21:21:41 +0100 |
commit | 548b10fdfa19df91419b8c4f4b5812f189f7294d (patch) | |
tree | 4b367ca5185d39d48a16b74b8f633ccdc22ff0ef /lisp/mastodon-toot.el | |
parent | 5dddfbe7ca90cfb0026dfadc24f98703f0e6c661 (diff) |
Update docstrings to match the current state.
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index c1d3ffa..feac7b5 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -802,7 +802,7 @@ Buffer-local variable `mastodon-toot-previous-window-config' holds the config." (defun mastodon-toot--mentions-to-string (mentions) "Applies mastodon-toot--process-local function to each mention, -removes empty string (self) from result and joins the sequence with \" \"." +removes empty string (self) from result and joins the sequence with whitespace \" \"." (mapconcat (lambda(mention) mention) (remove "" (mapcar (lambda(x) (mastodon-toot--process-local x)) mentions)) @@ -811,18 +811,21 @@ removes empty string (self) from result and joins the sequence with \" \"." (defun mastodon-toot--process-local (acct) "Add domain to local ACCT and replace the curent user name with \"\". -Mastodon requires the full user@domain, even in the case of local accts. -eg. \"user\" -> \"user@local.social\" (when local.social is the domain of the +Mastodon requires the full @user@domain, even in the case of local accts. +eg. \"user\" -> \"@user@local.social\" (when local.social is the domain of the mastodon-instance-url). eg. \"yourusername\" -> \"\" -eg. \"feduser@fed.social\" -> \"feduser@fed.social\"." +eg. \"feduser@fed.social\" -> \"@feduser@fed.social\"." (cond ((string-match-p "@" acct) (concat "@" acct)) ; federated acct ((string= (mastodon-auth--user-acct) acct) "") ; your acct (t (concat "@" acct "@" ; local acct (cadr (split-string mastodon-instance-url "/" t)))))) (defun mastodon-toot--mentions (status) - "Extract mentions (not the reply-to author or booster) from STATUS and process them into a string." + "Extract mentions (not the reply-to author or booster) from STATUS. +The mentioned users look like this: +Local user (including the logged in): `username`. +Federated user: `username@host.co`." (interactive) (let* ((boosted (mastodon-tl--field 'reblog status)) (mentions |