Submit media_ids when creating a message

This commit is contained in:
Alex Gleason
2023-02-02 14:59:23 -06:00
parent 1b8d118217
commit 3df63e59d3

View File

@ -235,7 +235,7 @@ const useChatActions = (chatId: string) => {
const createChatMessage = useMutation(
(
{ chatId, content, mediaId }: { chatId: string, content: string, mediaId?: string },
) => api.post<IChatMessage>(`/api/v1/pleroma/chats/${chatId}/messages`, { content, media_id: mediaId }),
) => api.post<IChatMessage>(`/api/v1/pleroma/chats/${chatId}/messages`, { content, media_id: mediaId, media_ids: [mediaId] }),
{
retry: false,
onMutate: async (variables) => {