mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-05-23 03:58:06 +00:00
changelog
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
2a78f4f786
commit
3b5d591808
1
changelog.d/pin-chats.fix
Normal file
1
changelog.d/pin-chats.fix
Normal file
|
@ -0,0 +1 @@
|
|||
Allow to pin/unpip chats
|
|
@ -224,14 +224,14 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
|
|||
end
|
||||
end
|
||||
|
||||
def pin(%{assigns: %{user: user}} = conn, %{id: id}) do
|
||||
def pin(%{assigns: %{user: user}, private: %{open_api_spex: %{params: %{id: id}}}} = conn, _) do
|
||||
with {:ok, chat} <- Chat.get_by_user_and_id(user, id),
|
||||
{:ok, chat} <- Chat.pin(chat) do
|
||||
render(conn, "show.json", chat: chat)
|
||||
end
|
||||
end
|
||||
|
||||
def unpin(%{assigns: %{user: user}} = conn, %{id: id}) do
|
||||
def unpin(%{assigns: %{user: user}, private: %{open_api_spex: %{params: %{id: id}}}} = conn, _) do
|
||||
with {:ok, chat} <- Chat.get_by_user_and_id(user, id),
|
||||
{:ok, chat} <- Chat.unpin(chat) do
|
||||
render(conn, "show.json", chat: chat)
|
||||
|
|
Loading…
Reference in a new issue