fix chat message sending not working

This commit is contained in:
Henry Jameson 2026-07-08 17:49:43 +03:00
commit bb4eb33c85
3 changed files with 4 additions and 3 deletions

View file

@ -4,7 +4,7 @@ import { parseChat } from 'src/services/entity_normalizer/entity_normalizer.serv
const PLEROMA_CHATS_URL = '/api/v1/pleroma/chats'
const PLEROMA_CHAT_URL = (id) => `/api/v1/pleroma/chats/by-account-id/${id}`
const PLEROMA_CHAT_MESSAGES_URL = (id, { maxId, sinceId, limit }) =>
const PLEROMA_CHAT_MESSAGES_URL = (id, { maxId, sinceId, limit } = {}) =>
`/api/v1/pleroma/chats/${id}/messages${paramsString({ maxId, sinceId, limit })}`
const PLEROMA_CHAT_READ_URL = (id) => `/api/v1/pleroma/chats/${id}/read`
const PLEROMA_DELETE_CHAT_MESSAGE_URL = (chatId, messageId) =>

View file

@ -17,7 +17,6 @@ export const paramsString = (params = {}) => {
}
})()
if (entries.length === 0) return ''
const arrays = []
const nonArrays = []
@ -48,6 +47,8 @@ export const paramsString = (params = {}) => {
})
})
if (nonArrays.length + arrays.length === 0) return ''
return (
'?' +
[

View file

@ -382,7 +382,7 @@ const Chat = {
if (retriesLeft <= 0) return
sendChatMessage({
params,
...params,
credentials: useOAuthStore().token,
})
.then(({ data }) => {