projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2c6ae7
)
Hook unfollow into TwitterAPI
author
Francis Dinh
<normandy@firemail.cc>
Tue, 22 May 2018 08:49:30 +0000
(
04:49
-0400)
committer
Francis Dinh
<normandy@firemail.cc>
Tue, 22 May 2018 08:49:30 +0000
(
04:49
-0400)
lib/pleroma/web/twitter_api/twitter_api.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/twitter_api/twitter_api.ex
b/lib/pleroma/web/twitter_api/twitter_api.ex
index 722e436e22e7f23b7aa16c75bfa7f489804bb53d..5eeebe1615330c21374690351300a552c1553396 100644
(file)
--- a/
lib/pleroma/web/twitter_api/twitter_api.ex
+++ b/
lib/pleroma/web/twitter_api/twitter_api.ex
@@
-36,14
+36,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
def unfollow(%User{} = follower, params) do
with {:ok, %User{} = unfollowed} <- get_user(params),
{:ok, follower, follow_activity} <- User.unfollow(follower, unfollowed),
- {:ok, _activity} <-
- ActivityPub.insert(%{
- "type" => "Undo",
- "actor" => follower.ap_id,
- # get latest Follow for these users
- "object" => follow_activity.data["id"],
- "published" => make_date()
- }) do
+ {:ok, _activity} <- ActivityPub.unfollow(follower, unfollowed) do
{:ok, follower, unfollowed}
else
err -> err