Chat: Fix missing chat id on second 'get'
This commit is contained in:
parent
c23cb8d37a
commit
9637cded21
2 changed files with 14 additions and 2 deletions
|
|
@ -46,7 +46,8 @@ defmodule Pleroma.Chat do
|
|||
%__MODULE__{}
|
||||
|> creation_cng(%{user_id: user_id, recipient: recipient})
|
||||
|> Repo.insert(
|
||||
on_conflict: :nothing,
|
||||
# Need to set something, otherwise we get nothing back at all
|
||||
on_conflict: [set: [recipient: recipient]],
|
||||
returning: true,
|
||||
conflict_target: [:user_id, :recipient]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue