Browse Source

Deduplicate incoming followers

master
Shadowfacts 1 year ago
parent
commit
e0c8f8e142
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      lib/clacks/inbox.ex

+ 2
- 1
lib/clacks/inbox.ex View File

@ -42,7 +42,8 @@ defmodule Clacks.Inbox do
store_activity(activity)
changeset = Actor.changeset(followed, %{followers: [follower_id | followed.followers]})
new_followers = [follower_id | followed.followers] |> Enum.uniq()
changeset = Actor.changeset(followed, %{followers: new_followers})
case Repo.update(changeset) do
{:error, changeset} ->


Loading…
Cancel
Save