aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/user.ex
diff options
context:
space:
mode:
authorSadposter <hannah+pleroma@coffee-and-dreams.uk>2019-04-05 14:20:13 +0100
committerHannah Ward <Hannah.ward9001@gmail.com>2019-04-05 15:30:23 +0100
commit007762e767fcd734bacd9700f5268591854a446a (patch)
treeffaa048292b17a05807da8adfb2310222aa58a8b /lib/pleroma/user.ex
parent79910ce5cc85f83e58c5f49e53b4b6263925d110 (diff)
downloadpleroma-007762e767fcd734bacd9700f5268591854a446a.tar.gz
Add notification checks
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r--lib/pleroma/user.ex7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index b7cab8642..70db520ca 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -935,10 +935,10 @@ defmodule Pleroma.User do
def unsubscribe(unsubscriber, %{ap_id: ap_id}) do
info_cng =
- subscriber.info
+ unsubscriber.info
|> User.Info.remove_from_subscriptions(ap_id)
- change(subscriber)
+ change(unsubscriber)
|> put_embed(:info, info_cng)
|> update_and_set_cache()
end
@@ -1005,6 +1005,9 @@ defmodule Pleroma.User do
def blocked_users(user),
do: Repo.all(from(u in User, where: u.ap_id in ^user.info.blocks))
+ def subscribed_users(user),
+ do: Repo.all(from(u in User, where: u.ap_id in ^user.info.subscriptions))
+
def block_domain(user, domain) do
info_cng =
user.info