fix chat message sending not working
This commit is contained in:
parent
832dad842a
commit
bb4eb33c85
3 changed files with 4 additions and 3 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
'?' +
|
||||
[
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ const Chat = {
|
|||
if (retriesLeft <= 0) return
|
||||
|
||||
sendChatMessage({
|
||||
params,
|
||||
...params,
|
||||
credentials: useOAuthStore().token,
|
||||
})
|
||||
.then(({ data }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue