Skip to content
Snippets Groups Projects
Commit 4cfab828 authored by MK Fain's avatar MK Fain Committed by Angelina Filippova
Browse files

fix maxId on api

parent c615902c
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,9 @@ export async function fetchChat(id, authHost, token) {
})
}
export async function fetchChatMessages(id, max_id, authHost, token) {
let url
const url = max_id
? `/api/pleroma/admin/chats/${id}/messages?max_id=${max_id}`
export async function fetchChatMessages(id, maxId, authHost, token) {
const url = maxId
? `/api/pleroma/admin/chats/${id}/messages?max_id=${maxId}`
: `/api/pleroma/admin/chats/${id}/messages`
return await request({
baseURL: baseName(authHost),
......
......@@ -45,7 +45,7 @@ describe('Chat view', () => {
expect(wrapper.find('.chat-particiants-receiver').isVisible()).toBe(true)
expect(store.state.chat.fetchedChat.receiver.acct).toBe('test10')
expect(store.state.chat.fetchedChatMessages[0].chat_id).toBe('9y8e7ESoVUiKVMAoCW')
expect(store.state.chat.max_id).toBe(null)
expect(store.state.chat.maxId).toBe(null)
done()
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment