Merge branch '2257-self-chat' into 'develop'

Resolve "Can't message yourself in a chat (but can start it)"

Closes #2257

See merge request pleroma/pleroma!3099
This commit is contained in:
rinpatch 2020-10-22 10:56:17 +00:00
commit 7058cac1c2
3 changed files with 16 additions and 0 deletions

View file

@ -306,6 +306,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
streamables =
[[actor, recipient], [recipient, actor]]
|> Enum.uniq()
|> Enum.map(fn [user, other_user] ->
if user.local do
{:ok, chat} = Chat.bump_or_create(user.id, other_user.ap_id)