diff --git a/src/api/chats.js b/src/api/chats.js index 8f93ad57f..001f00f26 100644 --- a/src/api/chats.js +++ b/src/api/chats.js @@ -4,7 +4,7 @@ import { parseChat, parseChatMessage } from 'src/services/entity_normalizer/enti 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) => diff --git a/src/api/helpers.js b/src/api/helpers.js index f965750c5..ce41eca77 100644 --- a/src/api/helpers.js +++ b/src/api/helpers.js @@ -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 ( '?' + [ diff --git a/src/components/palette_editor/palette_editor.vue b/src/components/palette_editor/palette_editor.vue index b27b21f00..1a73d5fdb 100644 --- a/src/components/palette_editor/palette_editor.vue +++ b/src/components/palette_editor/palette_editor.vue @@ -59,10 +59,12 @@ import { computed } from 'vue' import ColorInput from 'src/components/color_input/color_input.vue' import ContrastRatio from 'src/components/contrast_ratio/contrast_ratio.vue' -import { getContrastRatio, hex2rgb } from 'src/services/color_convert/color_convert.js' - import { useInterfaceStore } from 'src/stores/interface.js' +import { + getContrastRatio, + hex2rgb, +} from 'src/services/color_convert/color_convert.js' import { newExporter, newImporter,