projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04544da
)
On user making, check if we have a user with that uri.
author
Roger Braun
<roger@rogerbraun.net>
Fri, 12 May 2017 16:58:25 +0000
(18:58 +0200)
committer
Roger Braun
<roger@rogerbraun.net>
Fri, 12 May 2017 16:58:25 +0000
(18:58 +0200)
lib/pleroma/web/ostatus/ostatus.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/ostatus/ostatus.ex
b/lib/pleroma/web/ostatus/ostatus.ex
index 1ac38bd8af16c3c0a90b06bd8215fc3ae720907b..05bc4058ca7f1810b170033ed5e1d07eeae46087 100644
(file)
--- a/
lib/pleroma/web/ostatus/ostatus.ex
+++ b/
lib/pleroma/web/ostatus/ostatus.ex
@@
-235,8
+235,12
@@
defmodule Pleroma.Web.OStatus do
info: info,
avatar: info["avatar"]
}
- cs = User.remote_user_creation(data)
- Repo.insert(cs)
+ with %User{} = user <- User.get_by_ap_id(data.ap_id) do
+ {:ok, user}
+ else _e ->
+ cs = User.remote_user_creation(data)
+ Repo.insert(cs)
+ end
end
end