X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=inline;f=lib%2Fpleroma%2Fweb%2Fostatus%2Fhandlers%2Ffollow_handler.ex;h=aef450935c818e6ab44dec8d3a650159d843466f;hb=2791ce9a1ff2365ac7256f5e1dc2324dee2f82c9;hp=f5db5582b89f4549c59a474d1775ed8275d37c03;hpb=05f2cd0d930e93d1eb80a8a4ba3952f8ba46f5ce;p=akkoma diff --git a/lib/pleroma/web/ostatus/handlers/follow_handler.ex b/lib/pleroma/web/ostatus/handlers/follow_handler.ex index f5db5582b..aef450935 100644 --- a/lib/pleroma/web/ostatus/handlers/follow_handler.ex +++ b/lib/pleroma/web/ostatus/handlers/follow_handler.ex @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2018 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Pleroma.Web.OStatus.FollowHandler do alias Pleroma.Web.{XML, OStatus} alias Pleroma.Web.ActivityPub.ActivityPub @@ -6,7 +10,8 @@ defmodule Pleroma.Web.OStatus.FollowHandler do def handle(entry, doc) do with {:ok, actor} <- OStatus.find_make_or_update_user(doc), id when not is_nil(id) <- XML.string_from_xpath("/entry/id", entry), - followed_uri when not is_nil(followed_uri) <- XML.string_from_xpath("/entry/activity:object/id", entry), + followed_uri when not is_nil(followed_uri) <- + XML.string_from_xpath("/entry/activity:object/id", entry), {:ok, followed} <- OStatus.find_or_make_user(followed_uri), {:ok, activity} <- ActivityPub.follow(actor, followed, id, false) do User.follow(actor, followed)