aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-10-21 17:14:00 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-10-21 17:14:00 +0200
commitabe02e818d484da65fe23bbe5899ed15d43f1e67 (patch)
treeee6ffa148d9f9a9c50752b3f89038e2f646e3e94 /lisp/mastodon-profile.el
parente593ad461ae275c641c6c4c90f67d62a920610a0 (diff)
parentef6762986de6f4c85405dbc01ae19854cd2687fd (diff)
Merge branch 'develop'
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el25
1 files changed, 15 insertions, 10 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 6410591..40f834c 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -1,10 +1,10 @@
;;; mastodon-profile.el --- Functions for inspecting Mastodon profiles -*- lexical-binding: t -*-
;; Copyright (C) 2017-2019 Johnson Denen
-;; Copyright (C) 2020-2022 Marty Hiatt
+;; Copyright (C) 2020-2024 Marty Hiatt
;; Author: Johnson Denen <johnson.denen@gmail.com>
-;; Marty Hiatt <martianhiatus@riseup.net>
-;; Maintainer: Marty Hiatt <martianhiatus@riseup.net>
+;; Marty Hiatt <mousebot@disroot.org>
+;; Maintainer: Marty Hiatt <mousebot@disroot.org>
;; Homepage: https://codeberg.org/martianh/mastodon.el
;; This file is not part of GNU Emacs.
@@ -84,6 +84,7 @@
(autoload 'mastodon-search--query "mastodon-search")
(autoload 'mastodon-tl--field-status "mastodon-tl")
+(defvar mastodon-active-user)
(defvar mastodon-tl--horiz-bar)
(defvar mastodon-tl--update-point)
(defvar mastodon-toot--max-toot-chars)
@@ -386,6 +387,8 @@ This is done after changing the setting on the server."
Only do so if `mastodon-profile-account-settings' is nil."
(mastodon-profile--fetch-server-account-settings :no-force))
+;; FIXME: this does one request per setting! should just do one request then
+;; parse
(defun mastodon-profile--fetch-server-account-settings (&optional no-force)
"Fetch basic account settings from the server.
Store the values in `mastodon-profile-account-settings'.
@@ -859,13 +862,15 @@ These include the author, author of reblogged entries and any user mentioned."
status)) ; status is a user listing
(mentions (mastodon-tl--field-status 'mentions status))
(reblog (mastodon-tl--field-status 'reblog status)))
- (seq-filter #'stringp
- (seq-uniq
- (seq-concatenate
- 'list
- (list (alist-get 'acct this-account))
- (mastodon-profile--extract-users-handles reblog)
- (mastodon-tl--map-alist 'acct mentions)))))))
+ (seq-remove
+ (lambda (x) (string= x mastodon-active-user))
+ (seq-filter #'stringp
+ (seq-uniq
+ (seq-concatenate
+ 'list
+ (list (alist-get 'acct this-account))
+ (mastodon-profile--extract-users-handles reblog)
+ (mastodon-tl--map-alist 'acct mentions))))))))
(defun mastodon-profile--lookup-account-in-status (handle status)
"Return account for HANDLE using hints in STATUS if possible."