branch: elpa/mastodon
commit 355e1814be2496dfad9a23e07c5614b808cff2bd
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    refactor remote-local domain checks
---
 lisp/mastodon-tl.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index a33be2e00a..eba71462c1 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -488,13 +488,9 @@ instance, which you can do with
                          (mastodon-http--api "instance/peers")))))
     ;; condition-case doesn't work here, so i added basic error handling to
     ;; `mastodon-tl--init*' instead
-    (if (not known)
-        (when (y-or-n-p
-               "Domain appears unknown to your instance. Proceed?")
-          ;; TODO: refactor these calls:
-          (mastodon-tl--init buf
-                             "timelines/public" 'mastodon-tl--timeline nil
-                             params nil domain))
+    (when (or known
+              (y-or-n-p
+               "Domain appears unknown to your instance. Proceed?"))
       (mastodon-tl--init buf
                          "timelines/public" 'mastodon-tl--timeline nil
                          params nil domain))))

Reply via email to