Conversation: Also create participations for remote users.
Needed to get the participating user list.
This commit is contained in:
parent
6f880b1627
commit
c1ebb38d3a
|
@ -51,7 +51,7 @@ def create_or_bump_for(activity) do
|
||||||
ap_id when is_binary(ap_id) <- activity.data["object"]["context"] do
|
ap_id when is_binary(ap_id) <- activity.data["object"]["context"] do
|
||||||
{:ok, conversation} = create_for_ap_id(ap_id)
|
{:ok, conversation} = create_for_ap_id(ap_id)
|
||||||
|
|
||||||
users = User.get_users_from_set(activity.recipients)
|
users = User.get_users_from_set(activity.recipients, false)
|
||||||
|
|
||||||
participations =
|
participations =
|
||||||
Enum.map(users, fn user ->
|
Enum.map(users, fn user ->
|
||||||
|
|
|
@ -31,7 +31,7 @@ test "public posts don't create conversations" do
|
||||||
|
|
||||||
test "it creates or updates a conversation and participations for a given DM" do
|
test "it creates or updates a conversation and participations for a given DM" do
|
||||||
har = insert(:user)
|
har = insert(:user)
|
||||||
jafnhar = insert(:user)
|
jafnhar = insert(:user, local: false)
|
||||||
tridi = insert(:user)
|
tridi = insert(:user)
|
||||||
|
|
||||||
{:ok, activity} =
|
{:ok, activity} =
|
||||||
|
|
Loading…
Reference in New Issue