mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix(eslint): apply '*/comma-dangle' rules
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
4a67c5b7b4
commit
770e38efe5
127 changed files with 430 additions and 432 deletions
|
|
@ -16,7 +16,6 @@ export default [
|
|||
rules: {
|
||||
'@nextcloud-l10n/non-breaking-space': 'off', // changes translation strings
|
||||
'@stylistic/array-bracket-newline': 'off', // changes array formatting
|
||||
'@stylistic/comma-dangle': 'off', // changes 125 files
|
||||
'@stylistic/function-call-argument-newline': 'off', // changes 125 files
|
||||
'@stylistic/function-paren-newline': 'off', // weird formatting
|
||||
'@stylistic/implicit-arrow-linebreak': 'off', // weird formatting
|
||||
|
|
@ -54,7 +53,6 @@ export default [
|
|||
'prefer-const': 'off', // non-fixable
|
||||
'prefer-object-has-own': 'off', // changes Objet.prototype.hasOwnProperty
|
||||
'prefer-object-spread': 'off', // changes Object.assign
|
||||
'vue/comma-dangle': 'off', // changes commas
|
||||
'vue/first-attribute-linebreak': 'off', // changes all Vue files
|
||||
'vue/multi-word-component-names': 'off', // non-fixable
|
||||
'vue/no-boolean-default': 'off', // non-fixable
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ export default {
|
|||
} else {
|
||||
toggle?.removeAttribute('data-theme-dark')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
unreadCountsMap: {
|
||||
|
|
@ -189,7 +189,7 @@ export default {
|
|||
handler(value) {
|
||||
emit('talk:unread:updated', value)
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeCreate() {
|
||||
|
|
@ -430,7 +430,7 @@ export default {
|
|||
callback: () => {
|
||||
beforeRouteChangeListener(to, from, next)
|
||||
},
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import { useSessionIssueHandler } from './composables/useSessionIssueHandler.ts'
|
|||
import { EventBus } from './services/EventBus.ts'
|
||||
import {
|
||||
leaveConversationSync,
|
||||
setGuestUserName
|
||||
setGuestUserName,
|
||||
} from './services/participantsService.js'
|
||||
import { signalingKill } from './utils/webrtc/index.js'
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ export default {
|
|||
return {
|
||||
fetchCurrentConversationIntervalId: null,
|
||||
isWaitingToClose: false,
|
||||
recordingConsentGiven: false
|
||||
recordingConsentGiven: false,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ export default {
|
|||
// by the guest name addition event.
|
||||
emit('talk:media-settings:show', 'video-verification')
|
||||
unsubscribe('talk:guest-name:added', this.showGuestMediaSettings)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export default {
|
|||
|
||||
setup() {
|
||||
return {
|
||||
soundsStore: useSoundsStore()
|
||||
soundsStore: useSoundsStore(),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ export const mockedCapabilities: Capabilities = {
|
|||
],
|
||||
},
|
||||
version: '20.0.0-dev.0',
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export const mockedRemotes = {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.$emit('update:server', value)
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ export default {
|
|||
|| this.currentSetup.dialInInfo !== this.dialInInfo
|
||||
|| this.currentSetup.dialOutEnabled !== this.dialOutEnabled
|
||||
|| this.currentSetup.sipGroups !== this.sipGroups.map((group) => group.id).join('_')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
|
@ -186,7 +186,7 @@ export default {
|
|||
sharedSecret: this.sharedSecret,
|
||||
dialInInfo: this.dialInInfo,
|
||||
dialOutEnabled: this.dialOutEnabled,
|
||||
sipGroups: this.sipGroups.map((group) => group.id).join('_')
|
||||
sipGroups: this.sipGroups.map((group) => group.id).join('_'),
|
||||
}
|
||||
EventBus.emit('sip-settings-updated', this.currentSetup)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.$emit('update:server', value)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ const serversProxy = computed({
|
|||
},
|
||||
set(value) {
|
||||
emit('update:servers', value)
|
||||
}
|
||||
},
|
||||
})
|
||||
const secretProxy = computed({
|
||||
get() {
|
||||
|
|
@ -135,7 +135,7 @@ const secretProxy = computed({
|
|||
},
|
||||
set(value) {
|
||||
emit('update:secret', value)
|
||||
}
|
||||
},
|
||||
})
|
||||
/** Opposite value of hideWarning */
|
||||
const showWarningProxy = computed({
|
||||
|
|
@ -144,7 +144,7 @@ const showWarningProxy = computed({
|
|||
},
|
||||
set(value) {
|
||||
emit('update:hideWarning', !value)
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const debounceUpdateServers = debounce(updateServers, 1000)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.$emit('update:server', value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
isValidServer() {
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.updateServer(value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
turnSchemes: {
|
||||
|
|
@ -172,7 +172,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.updateSchemes(value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
turnProtocols: {
|
||||
|
|
@ -182,7 +182,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.updateProtocols(value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
turnSecret: {
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ export default {
|
|||
watch: {
|
||||
avatarUrl() {
|
||||
this.failed = false
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ export default {
|
|||
this.$emit('click-participant', this.participant)
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ type CalendarOption = { value: string, label: string, color: string }
|
|||
const calendarOptions = computed<CalendarOption[]>(() => groupwareStore.writeableCalendars.map((calendar) => ({
|
||||
value: calendar.uri,
|
||||
label: calendar.displayname,
|
||||
color: calendar.color ?? usernameToColor(calendar.uri).color
|
||||
color: calendar.color ?? usernameToColor(calendar.uri).color,
|
||||
})))
|
||||
const canScheduleMeeting = computed(() => {
|
||||
return hasTalkFeature(props.token, 'schedule-meeting') && store.getters.isModerator && calendarOptions.value.length !== 0
|
||||
|
|
@ -190,7 +190,7 @@ const selectedParticipants = computed(() => participants.value
|
|||
return a.displayName ? -1 : 1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
const isOneToOneConversation = computed(() => {
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ export default {
|
|||
}
|
||||
|
||||
return this.isBackgroundBlurred ? 'call-container__blurred' : 'call-container__non-blurred'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
@ -485,7 +485,7 @@ export default {
|
|||
handler(value) {
|
||||
this.callViewStore.setIsEmptyCallView(value)
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="empty-call-view"
|
||||
:class="{
|
||||
'empty-call-view--sidebar': isSidebar,
|
||||
'empty-call-view--small': isSmall
|
||||
'empty-call-view--small': isSmall,
|
||||
}"
|
||||
data-theme-dark>
|
||||
<component :is="emptyCallViewIcon" :size="isSidebar ? 32 : 64" class="empty-call-view__icon" />
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ export default {
|
|||
return
|
||||
}
|
||||
this.$emit('bottom-bar-hover', value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -329,13 +329,13 @@ export default {
|
|||
'video-container-grid': this.isGrid,
|
||||
'video-container-big': this.isBig,
|
||||
'one-to-one': this.isOneToOne,
|
||||
'presenter-overlay': this.isPresenterOverlay
|
||||
'presenter-overlay': this.isPresenterOverlay,
|
||||
}
|
||||
},
|
||||
|
||||
videoWrapperClass() {
|
||||
return {
|
||||
'presenter-overlay': this.isPresenterOverlay
|
||||
'presenter-overlay': this.isPresenterOverlay,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -630,7 +630,7 @@ export default {
|
|||
|
||||
handleHoverEvent(value) {
|
||||
this.$emit('force-promote-video', value ? this.model : null)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,14 +169,14 @@ export default {
|
|||
localSharedData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => {}
|
||||
default: () => {},
|
||||
},
|
||||
|
||||
screens: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => [],
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
setup() {
|
||||
|
|
@ -213,7 +213,7 @@ export default {
|
|||
computedStyle() {
|
||||
return {
|
||||
[isRTL() ? 'left' : 'right']: this.position[isRTL() ? 'left' : 'right'] + 'px',
|
||||
bottom: this.position.bottom + 'px'
|
||||
bottom: this.position.bottom + 'px',
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ export default {
|
|||
if (value) {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -106,7 +106,7 @@ export default {
|
|||
async handleUnban(id) {
|
||||
await unbanActor(this.token, id)
|
||||
this.banList = this.banList.filter((ban) => ban.id !== id)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export default {
|
|||
return {
|
||||
supportsAvatar,
|
||||
CONVERSATION,
|
||||
maxDescriptionLength
|
||||
maxDescriptionLength,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ export default {
|
|||
|
||||
recordingConsentRequired() {
|
||||
return this.conversation.recordingConsent === CALL.RECORDING_CONSENT.ENABLED
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeMount() {
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ export default {
|
|||
escape: false,
|
||||
sanitize: false,
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.changeExpiration(value)
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ export default {
|
|||
// Turn on password protection and set a password
|
||||
await this.togglePassword(true)
|
||||
await this.$store.dispatch('toggleGuests', { token: this.token, allowGuests: true, password: this.password })
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ export default {
|
|||
default:
|
||||
return t('spreed', 'This conversation is limited to the current participants')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.saveLobbyTimer(value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
dateTimePickerAttrs() {
|
||||
|
|
@ -252,7 +252,7 @@ export default {
|
|||
|
||||
openPollDraftHandler() {
|
||||
EventBus.emit('poll-drafts-open', { selector: '#settings-section_meeting' })
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ export default {
|
|||
default:
|
||||
return t('spreed', 'All participants are allowed to mention @all')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ const eventDateLabel = computed(() => {
|
|||
// TRANSLATORS: e.g. "Tomorrow 10:00 - 11:00"
|
||||
time = t('spreed', '{dayPrefix} {dateTime}', {
|
||||
dayPrefix: isToday ? relativeFormatter.format(0, 'day') : relativeFormatter.format(1, 'day'),
|
||||
dateTime: timeRange
|
||||
dateTime: timeRange,
|
||||
})
|
||||
} else {
|
||||
time = Intl.DateTimeFormat(getCanonicalLocale(), {
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ function scrollEventCards({ direction }: { direction: 'backward' | 'forward' })
|
|||
:to="{
|
||||
name: 'conversation',
|
||||
params: { token: reminder.roomToken, skipLeaveWarning: true },
|
||||
hash: `#message_${reminder.messageId}`
|
||||
hash: `#message_${reminder.messageId}`,
|
||||
}"
|
||||
:actor-id="reminder.actorId"
|
||||
:actor-type="reminder.actorType"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const importListDescription = t('spreed', 'Content format is comma-separated val
|
|||
undefined,
|
||||
undefined, {
|
||||
escape: true,
|
||||
sanitize: true
|
||||
sanitize: true,
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ export default {
|
|||
} catch (error) {
|
||||
if (error?.response?.data?.ocs?.data?.message) {
|
||||
showError(t('spreed', 'Phone number could not be called: {error}', {
|
||||
error: error?.response?.data?.ocs?.data?.message
|
||||
error: error?.response?.data?.ocs?.data?.message,
|
||||
}))
|
||||
} else {
|
||||
console.error(error)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
:class="{
|
||||
'conversation--active': isActive,
|
||||
'conversation--compact': compact,
|
||||
'conversation--compact__read': compact && !item.unreadMessages
|
||||
'conversation--compact__read': compact && !item.unreadMessages,
|
||||
}"
|
||||
:actions-aria-label="t('spreed', 'Conversation actions')"
|
||||
:to="to"
|
||||
|
|
@ -456,13 +456,13 @@ export default {
|
|||
return {
|
||||
component: 'IconVideo',
|
||||
color: '#E9322D',
|
||||
text: t('spreed', 'Call in progress')
|
||||
text: t('spreed', 'Call in progress'),
|
||||
}
|
||||
} else if (this.item.isFavorite) {
|
||||
return {
|
||||
component: 'IconStar',
|
||||
color: '#FFCC00',
|
||||
text: t('spreed', 'Favorite')
|
||||
text: t('spreed', 'Favorite'),
|
||||
}
|
||||
}
|
||||
return null
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ export default {
|
|||
|
||||
invitationsLoadedCount() {
|
||||
return Object.keys(this.invitations).length
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
expose: ['showModal'],
|
||||
|
|
@ -171,8 +171,8 @@ export default {
|
|||
return {
|
||||
user: {
|
||||
component: Mention,
|
||||
props: { id, name: item.inviterDisplayName, server, token: item.token || 'new', type: 'user' }
|
||||
}
|
||||
props: { id, name: item.inviterDisplayName, server, token: item.token || 'new', type: 'user' },
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ describe('LeftSidebar.vue', () => {
|
|||
router,
|
||||
store,
|
||||
provide: {
|
||||
'NcContent:setHasAppNavigation': () => {}
|
||||
'NcContent:setHasAppNavigation': () => {},
|
||||
},
|
||||
stubs: {
|
||||
// to prevent user status fetching
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ export default {
|
|||
this.forceFullRoomListRefreshAfterXLoops = 10
|
||||
this.fetchConversations()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeMount() {
|
||||
|
|
@ -946,7 +946,7 @@ export default {
|
|||
showTalkDashboard() {
|
||||
this.$router.push({ name: 'root' })
|
||||
.catch((err) => console.debug(`Error while pushing the dashboard route: ${err}`))
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ const searchResultsVirtual = computed(() => {
|
|||
const lowerSearchText = props.searchText.toLowerCase()
|
||||
const searchResultsConversationList = props.conversationsList.filter((conversation) =>
|
||||
conversation.displayName.toLowerCase().includes(lowerSearchText)
|
||||
|| conversation.name.toLowerCase().includes(lowerSearchText)
|
||||
|| conversation.name.toLowerCase().includes(lowerSearchText),
|
||||
)
|
||||
|
||||
// Add conversations section
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const deviceSelectedOption = computed<NcSelectOption | null>({
|
|||
},
|
||||
set: (value) => {
|
||||
updateDeviceId(value?.id ?? null)
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default {
|
|||
|
||||
setup() {
|
||||
return {
|
||||
soundsStore: useSoundsStore()
|
||||
soundsStore: useSoundsStore(),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ export default {
|
|||
animationDelay: Math.random() * -2 + 's',
|
||||
},
|
||||
}))
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
|
|
|||
|
|
@ -271,8 +271,8 @@ export default {
|
|||
props: {
|
||||
recordingConsentGiven: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
emits: ['update:recording-consent-given'],
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
class="background-editor__element"
|
||||
:class="{ 'background-editor__element--selected': selectedBackground === path }"
|
||||
:style="{
|
||||
'background-image': 'url(' + path + ')'
|
||||
'background-image': 'url(' + path + ')',
|
||||
}"
|
||||
@click="handleSelectBackground(path)">
|
||||
<IconCheckBold v-if="selectedBackground === path"
|
||||
|
|
@ -168,7 +168,7 @@ export default {
|
|||
return [{
|
||||
label: t('spreed', 'Confirm'),
|
||||
callback: (nodes) => this.handleFileChoose(nodes),
|
||||
type: 'primary'
|
||||
type: 'primary',
|
||||
}]
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ describe('Message.vue', () => {
|
|||
systemMessage: '',
|
||||
messageType: 'comment',
|
||||
reactions: [],
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -370,7 +370,7 @@ describe('Message.vue', () => {
|
|||
component: Mention,
|
||||
props: mentions['mention-call1'],
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ describe('Message.vue', () => {
|
|||
component: FilePreview,
|
||||
props: { file: params.file },
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ describe('Message.vue', () => {
|
|||
component: FilePreview,
|
||||
props: { file: params.file },
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
expect(messageEl.props('text')).toBe('{file}' + '\n\n' + caption)
|
||||
|
|
@ -454,7 +454,7 @@ describe('Message.vue', () => {
|
|||
component: DeckCard,
|
||||
props: params['deck-card'],
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -472,7 +472,7 @@ describe('Message.vue', () => {
|
|||
component: Location,
|
||||
props: params['geo-location'],
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -499,7 +499,7 @@ describe('Message.vue', () => {
|
|||
component: DefaultParameter,
|
||||
props: params.unknown,
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ export default {
|
|||
const mimetype = this.message.messageParameters[p].mimetype
|
||||
const itemType = getItemTypeFromMessage({
|
||||
messageParameters: this.message.messageParameters,
|
||||
messageType: this.message.messageType
|
||||
messageType: this.message.messageType,
|
||||
})
|
||||
if (Object.values(MENTION.TYPE).includes(type)) {
|
||||
richParameters[p] = {
|
||||
|
|
@ -464,7 +464,7 @@ export default {
|
|||
this.loading = true
|
||||
await this.chatExtrasStore.requestChatSummary(this.message.token, this.message.id)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ describe('MessageButtonsBar.vue', () => {
|
|||
apiVersion: 'v3',
|
||||
message: messageProps.message,
|
||||
metadata: conversationProps,
|
||||
},)
|
||||
})
|
||||
|
||||
const actionButton2 = findNcActionButton(wrapper, 'second action')
|
||||
expect(actionButton2.exists()).toBeTruthy()
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ export default {
|
|||
|
||||
canReply() {
|
||||
return this.message.isReplyable && !this.isConversationReadOnly && (this.conversation.permissions & PARTICIPANT.PERMISSIONS.CHAT) !== 0
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
@ -693,7 +693,7 @@ export default {
|
|||
async forwardToNote() {
|
||||
try {
|
||||
await this.$store.dispatch('forwardMessage', {
|
||||
messageToBeForwarded: this.$store.getters.message(this.message.token, this.message.id)
|
||||
messageToBeForwarded: this.$store.getters.message(this.message.token, this.message.id),
|
||||
})
|
||||
showSuccess(t('spreed', 'Message forwarded to "Note to self"'))
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ export default {
|
|||
|
||||
const sizeMultiplicator = Math.min(
|
||||
(heightConstraint > parseInt(this.file.height, 10) ? 1 : (heightConstraint / parseInt(this.file.height, 10))),
|
||||
(widthConstraint > parseInt(this.file.width, 10) ? 1 : (widthConstraint / parseInt(this.file.width, 10)))
|
||||
(widthConstraint > parseInt(this.file.width, 10) ? 1 : (widthConstraint / parseInt(this.file.width, 10))),
|
||||
)
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ export default {
|
|||
|
||||
mounted() {
|
||||
this.size = parseInt(window.getComputedStyle(this.$refs.mention).fontSize, 10) * 4 / 3 ?? 20
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export default {
|
|||
|
||||
canEditPollDraft() {
|
||||
return this.draft && hasTalkFeature(this.token, 'edit-draft-poll')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ describe('Reactions.vue', () => {
|
|||
reactions: { '🎄': 2, '🔥': 2, '🔒': 2 },
|
||||
reactionsSelf: ['🔥'],
|
||||
timestamp: 1703668230,
|
||||
token
|
||||
token,
|
||||
}
|
||||
messageMock = jest.fn().mockReturnValue(message)
|
||||
testStoreConfig.modules.messagesStore.getters.message = () => messageMock
|
||||
|
|
@ -86,22 +86,22 @@ describe('Reactions.vue', () => {
|
|||
reactionsStored = {
|
||||
'🎄': [
|
||||
{ actorDisplayName: 'user1', actorId: 'actorId1', actorType: 'users' },
|
||||
{ actorDisplayName: 'user2', actorId: 'actorId2', actorType: 'guests' }
|
||||
{ actorDisplayName: 'user2', actorId: 'actorId2', actorType: 'guests' },
|
||||
],
|
||||
'🔥': [
|
||||
{ actorDisplayName: 'user3', actorId: 'admin', actorType: 'users' },
|
||||
{ actorDisplayName: 'user4', actorId: 'actorId4', actorType: 'users' }
|
||||
{ actorDisplayName: 'user4', actorId: 'actorId4', actorType: 'users' },
|
||||
],
|
||||
'🔒': [
|
||||
{ actorDisplayName: 'user3', actorId: 'actorId3', actorType: 'users' },
|
||||
{ actorDisplayName: 'user4', actorId: 'actorId4', actorType: 'users' }
|
||||
{ actorDisplayName: 'user4', actorId: 'actorId4', actorType: 'users' },
|
||||
],
|
||||
}
|
||||
|
||||
reactionsStore.updateReactions({
|
||||
token,
|
||||
messageId,
|
||||
reactionsDetails: reactionsStored
|
||||
reactionsDetails: reactionsStored,
|
||||
})
|
||||
|
||||
reactionsProps = {
|
||||
|
|
@ -176,7 +176,7 @@ describe('Reactions.vue', () => {
|
|||
reactions: {},
|
||||
reactionsSelf: [],
|
||||
timestamp: 1703668230,
|
||||
token
|
||||
token,
|
||||
})
|
||||
testStoreConfig.modules.messagesStore.getters.message = () => messageMock
|
||||
store = new Vuex.Store(testStoreConfig)
|
||||
|
|
@ -255,7 +255,7 @@ describe('Reactions.vue', () => {
|
|||
|
||||
const removedReaction = {
|
||||
...reactionsStored,
|
||||
'🔥': [...reactionsStored['🔥'].filter((obj) => obj.actorId !== 'admin')] // remove the current user
|
||||
'🔥': [...reactionsStored['🔥'].filter((obj) => obj.actorId !== 'admin')], // remove the current user
|
||||
}
|
||||
const responseRemoved = generateOCSResponse({ payload: removedReaction })
|
||||
removeReactionFromMessage.mockResolvedValue(responseRemoved)
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ export default {
|
|||
const detailedReactionsSimplified = Object.fromEntries(
|
||||
Object.entries(this.detailedReactions)
|
||||
.sort() // Plain reactions come sorted
|
||||
.map(([key, value]) => [key, value.length])
|
||||
.map(([key, value]) => [key, value.length]),
|
||||
)
|
||||
return this.hasReactionsLoaded
|
||||
&& JSON.stringify(this.plainReactions) !== JSON.stringify(detailedReactionsSimplified)
|
||||
|
|
@ -276,7 +276,7 @@ export default {
|
|||
}
|
||||
return n('spreed', 'and %n other participant', 'and %n other participants', this.reactionsCount(reaction) - 3)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ export default {
|
|||
actorDisplayNameWithFallback,
|
||||
actorId: actor.actorId,
|
||||
actorType: actor.actorType,
|
||||
reaction: [reaction]
|
||||
reaction: [reaction],
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-1',
|
||||
displayName: 'actor one',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'call_left',
|
||||
timestamp: 2000,
|
||||
|
|
@ -64,7 +64,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-1',
|
||||
displayName: 'actor one',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'call_joined',
|
||||
timestamp: 1000,
|
||||
|
|
@ -100,7 +100,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-1',
|
||||
displayName: 'actor one',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
previousMessageId: 90,
|
||||
|
|
@ -134,7 +134,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-1',
|
||||
displayName: 'actor one',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'call_joined',
|
||||
timestamp: 2000,
|
||||
|
|
@ -152,7 +152,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-2',
|
||||
displayName: 'actor two',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'call_joined',
|
||||
timestamp: 1000,
|
||||
|
|
@ -170,7 +170,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-3',
|
||||
displayName: 'actor three',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'call_joined',
|
||||
timestamp: 300,
|
||||
|
|
@ -326,7 +326,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-4',
|
||||
displayName: 'actor four',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'user_removed',
|
||||
timestamp: 100,
|
||||
|
|
@ -349,7 +349,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-5',
|
||||
displayName: 'actor five',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'user_removed',
|
||||
timestamp: 200,
|
||||
|
|
@ -372,7 +372,7 @@ describe('MessagesSystemGroup.vue', () => {
|
|||
id: 'actor-6',
|
||||
displayName: 'actor six',
|
||||
type: ATTENDEE.ACTOR_TYPE.USERS,
|
||||
}
|
||||
},
|
||||
},
|
||||
systemMessage: 'user_removed',
|
||||
timestamp: 300,
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export default {
|
|||
computed: {
|
||||
lastReadMessageId() {
|
||||
return this.$store.getters.conversation(this.token)?.lastReadMessage
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export default {
|
|||
Message,
|
||||
NcEmptyContent,
|
||||
NcLoadingIcon,
|
||||
TransitionWrapper
|
||||
TransitionWrapper,
|
||||
},
|
||||
|
||||
provide() {
|
||||
|
|
@ -259,7 +259,7 @@ export default {
|
|||
isChatBeginningReached() {
|
||||
return this.stopFetchingOldMessages || (this.messagesList?.[0]?.messageType === 'system'
|
||||
&& ['conversation_created', 'history_cleared'].includes(this.messagesList[0].systemMessage))
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ export default {
|
|||
}
|
||||
|
||||
this.updateSelectedParticipants(this.participantPhoneItem)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
return t('spreed', 'All set, the conversation "{conversationName}" was created.', { conversationName: this.conversationName })
|
||||
}
|
||||
return ''
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ export default {
|
|||
listable: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
emits: ['update:newConversation', 'update:password', 'update:listable', 'avatar-edited', 'handle-enter', 'is-password-valid'],
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ export default {
|
|||
return [{
|
||||
label: t('spreed', 'Choose'),
|
||||
callback: (nodes) => this.handleFileShare(nodes),
|
||||
type: 'primary'
|
||||
type: 'primary',
|
||||
}]
|
||||
},
|
||||
|
||||
|
|
@ -485,7 +485,7 @@ export default {
|
|||
|
||||
canEditMessage() {
|
||||
return hasTalkFeature(this.token, 'edit-messages')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
@ -552,7 +552,7 @@ export default {
|
|||
this.clearTypingInterval()
|
||||
this.checkAbsenceStatus()
|
||||
this.clearSilentState()
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -629,7 +629,7 @@ export default {
|
|||
this.chatExtrasStore.setChatEditInput({
|
||||
token: this.token,
|
||||
text,
|
||||
parameters: this.messageToEdit.messageParameters
|
||||
parameters: this.messageToEdit.messageParameters,
|
||||
})
|
||||
} else if (text && text !== this.chatInput) {
|
||||
this.chatExtrasStore.setChatInput({ token: this.token, text })
|
||||
|
|
@ -953,7 +953,7 @@ export default {
|
|||
if ((this.text === '' || this.text === '\n') && this.silentChat && !this.upload) {
|
||||
this.toggleSilentChat()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ export default {
|
|||
userAbsenceCaption() {
|
||||
return t('spreed', '{user} is out of office and might not respond.', { user: this.displayName }, undefined, {
|
||||
escape: false,
|
||||
sanitize: false
|
||||
sanitize: false,
|
||||
})
|
||||
},
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ export default {
|
|||
name: 'root',
|
||||
query: {
|
||||
callUser: this.userAbsence.replacementUserId,
|
||||
}
|
||||
},
|
||||
}).catch((err) => console.debug(`Error while pushing the new conversation's route: ${err}`))
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ export default {
|
|||
return loadState(
|
||||
'spreed',
|
||||
'default_permissions',
|
||||
PERMISSIONS.MAX_DEFAULT & ~PERMISSIONS.LOBBY_IGNORE
|
||||
PERMISSIONS.MAX_DEFAULT & ~PERMISSIONS.LOBBY_IGNORE,
|
||||
)
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ const isAnonymous = computed({
|
|||
},
|
||||
set(value) {
|
||||
pollForm.resultMode = value ? POLL.MODE.HIDDEN : POLL.MODE.PUBLIC
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const isMultipleAnswer = computed({
|
||||
|
|
@ -198,7 +198,7 @@ const isMultipleAnswer = computed({
|
|||
},
|
||||
set(value) {
|
||||
pollForm.maxVotes = value ? POLL.ANSWER_TYPE.MULTIPLE : POLL.ANSWER_TYPE.SINGLE
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const exportPollURI = computed(() => convertToJSONDataURI(pollForm))
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ export default {
|
|||
await this.breakoutRoomsStore.broadcastMessageToBreakoutRooms({ token, message: temporaryMessage.message })
|
||||
showSuccess(t('spreed', 'The message was sent to all breakout rooms'))
|
||||
this.isSendMessageDialogOpened = false
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -630,7 +630,7 @@ describe('Participant.vue', () => {
|
|||
token: 'current-token',
|
||||
attendeeId: 'alice-attendee-id',
|
||||
banParticipant: true,
|
||||
internalNote
|
||||
internalNote,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ export default {
|
|||
if (!value || !(value === 'ringing' || value === 'accepted')) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -922,7 +922,7 @@ export default {
|
|||
this.disabled = false
|
||||
if (error?.response?.data?.ocs?.data?.message) {
|
||||
showError(t('spreed', 'Phone number could not be called: {error}', {
|
||||
error: error?.response?.data?.ocs?.data?.message
|
||||
error: error?.response?.data?.ocs?.data?.message,
|
||||
}))
|
||||
} else {
|
||||
console.error(error)
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ describe('ParticipantPermissionsEditor.vue', () => {
|
|||
| PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO
|
||||
| PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO
|
||||
| PARTICIPANT.PERMISSIONS.CUSTOM,
|
||||
})
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ describe('ParticipantPermissionsEditor.vue', () => {
|
|||
| PARTICIPANT.PERMISSIONS.CALL_JOIN
|
||||
| PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO
|
||||
| PARTICIPANT.PERMISSIONS.CUSTOM,
|
||||
})
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
contentModeIndex,
|
||||
sidebar,
|
||||
sidebarContent,
|
||||
sidebarStore: useSidebarStore()
|
||||
sidebarStore: useSidebarStore(),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -370,7 +370,7 @@ export default {
|
|||
return {
|
||||
'data-theme-dark': true,
|
||||
'aria-label': t('spreed', 'Open chat'),
|
||||
title: t('spreed', 'Open chat')
|
||||
title: t('spreed', 'Open chat'),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -111,14 +111,14 @@ const profileInformation = computed(() => {
|
|||
fields.push({
|
||||
key: 'person',
|
||||
icon: IconAccount,
|
||||
label: joinFields(profileInfo.value.role, profileInfo.value.pronouns)
|
||||
label: joinFields(profileInfo.value.role, profileInfo.value.pronouns),
|
||||
})
|
||||
}
|
||||
if (profileInfo.value.organisation || profileInfo.value.address) {
|
||||
fields.push({
|
||||
key: 'organisation',
|
||||
icon: IconOfficeBuilding,
|
||||
label: joinFields(profileInfo.value.organisation, profileInfo.value.address)
|
||||
label: joinFields(profileInfo.value.organisation, profileInfo.value.address),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,44 +25,44 @@ import { useDashboardStore } from '../../../stores/dashboard.ts'
|
|||
const props = defineProps({
|
||||
messageId: {
|
||||
type: [Number, String],
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
to: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
default: () => ({}),
|
||||
},
|
||||
subline: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
actorId: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
actorType: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
token: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
timestamp: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
messageParameters: {
|
||||
type: [Array, Object],
|
||||
default: () => ([])
|
||||
default: () => ([]),
|
||||
},
|
||||
isReminder: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const store = useStore()
|
||||
|
|
@ -76,7 +76,7 @@ const name = computed(() => {
|
|||
}
|
||||
return t('spreed', '{actor} in {conversation}',
|
||||
{ actor: props.title, conversation: conversation.value.displayName },
|
||||
{ escape: false, sanitize: false }
|
||||
{ escape: false, sanitize: false },
|
||||
)
|
||||
})
|
||||
const richSubline = computed(() => {
|
||||
|
|
|
|||
|
|
@ -225,11 +225,11 @@ async function fetchSearchResults(isNew = true): Promise<void> {
|
|||
hash: `#message_${entry.attributes.messageId}`,
|
||||
params: {
|
||||
token: entry.attributes.conversation,
|
||||
skipLeaveWarning: true
|
||||
}
|
||||
}
|
||||
skipLeaveWarning: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
}),
|
||||
)
|
||||
nextTick(() => initializeNavigation())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ export default {
|
|||
if (this.token && this.active && this.isSidebarOpen) {
|
||||
this.sharedItemsStore.getSharedItemsOverview(this.token)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ export default {
|
|||
|
||||
openPollDraftHandler() {
|
||||
EventBus.emit('poll-drafts-open', {})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ describe('RoomSelector', () => {
|
|||
const wrapper = await mountRoomSelector()
|
||||
expect(axios.get).toHaveBeenCalledWith(
|
||||
generateOcsUrl('/apps/spreed/api/v4/room'),
|
||||
{ params: { includeStatus: 1 } }
|
||||
{ params: { includeStatus: 1 } },
|
||||
)
|
||||
|
||||
// Assert
|
||||
|
|
@ -143,7 +143,7 @@ describe('RoomSelector', () => {
|
|||
const wrapper = await mountRoomSelector({ listOpenConversations: true })
|
||||
expect(axios.get).toHaveBeenCalledWith(
|
||||
generateOcsUrl('/apps/spreed/api/v4/listed-room'),
|
||||
{ params: { searchTerm: '' } }
|
||||
{ params: { searchTerm: '' } },
|
||||
)
|
||||
|
||||
// Assert
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ export default {
|
|||
&& room.objectType !== CONVERSATION.OBJECT_TYPE.VIDEO_VERIFICATION
|
||||
&& (!this.currentRoom || this.currentRoom !== room.token)
|
||||
&& (!this.showPostableOnly || room.readOnly === CONVERSATION.STATE.READ_WRITE)
|
||||
&& (!this.searchText || room.displayName.toLowerCase().includes(this.searchText.toLowerCase()))
|
||||
&& (!this.searchText || room.displayName.toLowerCase().includes(this.searchText.toLowerCase())),
|
||||
)
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -106,14 +106,14 @@ export default {
|
|||
label: phoneNumber,
|
||||
phoneNumber,
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
t,
|
||||
selectPhoneNumber() {
|
||||
this.$emit('select', this.participantPhoneItem)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ export default {
|
|||
return [{
|
||||
label: t('spreed', 'Choose'),
|
||||
callback: (nodes) => this.selectAttachmentFolder(nodes),
|
||||
type: 'primary'
|
||||
type: 'primary',
|
||||
}]
|
||||
},
|
||||
},
|
||||
|
|
@ -395,7 +395,7 @@ export default {
|
|||
this.privacyLoading = true
|
||||
try {
|
||||
await this.settingsStore.updateReadStatusPrivacy(
|
||||
this.readStatusPrivacyIsPublic ? PRIVACY.PRIVATE : PRIVACY.PUBLIC
|
||||
this.readStatusPrivacyIsPublic ? PRIVACY.PRIVATE : PRIVACY.PUBLIC,
|
||||
)
|
||||
showSuccess(t('spreed', 'Your privacy setting has been saved'))
|
||||
} catch (exception) {
|
||||
|
|
@ -408,7 +408,7 @@ export default {
|
|||
this.privacyLoading = true
|
||||
try {
|
||||
await this.settingsStore.updateTypingStatusPrivacy(
|
||||
this.typingStatusPrivacyIsPublic ? PRIVACY.PRIVATE : PRIVACY.PUBLIC
|
||||
this.typingStatusPrivacyIsPublic ? PRIVACY.PRIVATE : PRIVACY.PUBLIC,
|
||||
)
|
||||
showSuccess(t('spreed', 'Your privacy setting has been saved'))
|
||||
} catch (exception) {
|
||||
|
|
@ -421,7 +421,7 @@ export default {
|
|||
this.appearanceLoading = true
|
||||
try {
|
||||
await this.settingsStore.setConversationsListStyle(
|
||||
value ? CONVERSATION.LIST_STYLE.COMPACT : CONVERSATION.LIST_STYLE.TWO_LINES
|
||||
value ? CONVERSATION.LIST_STYLE.COMPACT : CONVERSATION.LIST_STYLE.TWO_LINES,
|
||||
)
|
||||
showSuccess(t('spreed', 'Your personal setting has been saved'))
|
||||
} catch (exception) {
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ export default {
|
|||
token(newValue, oldValue) {
|
||||
this.callViewStore.resetCallHasJustEnded()
|
||||
this.talkHashStore.resetTalkProxyHashDirty(oldValue)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
|
@ -475,7 +475,7 @@ export default {
|
|||
} catch (error) {
|
||||
if (error?.response?.data?.ocs?.data?.message) {
|
||||
showError(t('spreed', 'Phone number could not be called: {error}', {
|
||||
error: error?.response?.data?.ocs?.data?.message
|
||||
error: error?.response?.data?.ocs?.data?.message,
|
||||
}))
|
||||
} else {
|
||||
console.error(error)
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ export default {
|
|||
return
|
||||
}
|
||||
this.groupwareStore.getUpcomingEvents(value)
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ export default {
|
|||
{
|
||||
sessionId: this.$store.getters.getSessionId(),
|
||||
raisedHand: this.model.attributes.raisedHand,
|
||||
}
|
||||
},
|
||||
)
|
||||
// If the current conversation is a break-out room and the user is not a moderator,
|
||||
// also send request for assistance to the moderators.
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ const descriptionLabel = computed(() => {
|
|||
return t('spreed', 'Would you like to delete this conversation?')
|
||||
}
|
||||
const expirationDurationFormatted = new Intl.RelativeTimeFormat(getLanguage(), { numeric: 'always' }).format(
|
||||
expirationDuration.value, 'days'
|
||||
expirationDuration.value, 'days',
|
||||
)
|
||||
return t('spreed', 'This conversation will be automatically deleted for everyone {expirationDurationFormatted} of no activity.', { expirationDurationFormatted })
|
||||
})
|
||||
|
|
@ -104,7 +104,7 @@ async function showConfirmationDialog() {
|
|||
callback: () => {
|
||||
deleteEventConversation()
|
||||
},
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,26 +81,26 @@ import { regionCodes } from '../../regionCodes.js'
|
|||
const allowedKeys = /^[0-9+\-()*#\s]+$/
|
||||
|
||||
const buttonsDigits = [
|
||||
{ value: '1', label: '1', },
|
||||
{ value: '2', label: '2', },
|
||||
{ value: '3', label: '3', },
|
||||
{ value: '4', label: '4', },
|
||||
{ value: '5', label: '5', },
|
||||
{ value: '6', label: '6', },
|
||||
{ value: '7', label: '7', },
|
||||
{ value: '8', label: '8', },
|
||||
{ value: '9', label: '9', },
|
||||
{ value: '1', label: '1' },
|
||||
{ value: '2', label: '2' },
|
||||
{ value: '3', label: '3' },
|
||||
{ value: '4', label: '4' },
|
||||
{ value: '5', label: '5' },
|
||||
{ value: '6', label: '6' },
|
||||
{ value: '7', label: '7' },
|
||||
{ value: '8', label: '8' },
|
||||
{ value: '9', label: '9' },
|
||||
]
|
||||
|
||||
const buttonsNumberOption = [
|
||||
{ value: '+', label: '+', },
|
||||
{ value: '0', label: '0', },
|
||||
{ value: '+', label: '+' },
|
||||
{ value: '0', label: '0' },
|
||||
]
|
||||
|
||||
const buttonsDialOption = [
|
||||
{ value: '*', label: '*', },
|
||||
{ value: '0', label: '0', },
|
||||
{ value: '#', label: '#', },
|
||||
{ value: '*', label: '*' },
|
||||
{ value: '0', label: '0' },
|
||||
{ value: '#', label: '#' },
|
||||
]
|
||||
|
||||
export default {
|
||||
|
|
@ -150,14 +150,14 @@ export default {
|
|||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
emits: ['dial:type', 'update:value', 'submit'],
|
||||
|
||||
setup(props) {
|
||||
const options = Object.values(regionCodes).map((region) =>
|
||||
({ ...region, dial_and_name: region.dial_code + ' ' + region.name })
|
||||
({ ...region, dial_and_name: region.dial_code + ' ' + region.name }),
|
||||
)
|
||||
|
||||
const buttons = props.dialing
|
||||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
|
||||
handleBackspace() {
|
||||
this.$emit('update:value', this.value.slice(0, -1))
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export default {
|
|||
|
||||
set(value) {
|
||||
this.updateValue(value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
isSearching() {
|
||||
|
|
@ -187,7 +187,7 @@ export default {
|
|||
} else {
|
||||
this.getTrailingButton()?.setAttribute('tabindex', '-1')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ jest.mock('@nextcloud/capabilities', () => ({
|
|||
features: ['edit-messages', 'edit-messages-note-to-self'],
|
||||
'features-local': [],
|
||||
},
|
||||
}))
|
||||
})),
|
||||
}))
|
||||
jest.mock('../useStore.js')
|
||||
jest.mock('../useConversationInfo.ts')
|
||||
|
|
|
|||
|
|
@ -57,13 +57,13 @@ export function useMessageInfo(message = ref({})) {
|
|||
|
||||
const isCurrentUserOwnMessage = computed(() =>
|
||||
message.value.actorId === currentActorId
|
||||
&& message.value.actorType === currentActorType
|
||||
&& message.value.actorType === currentActorType,
|
||||
)
|
||||
const isBotInOneToOne = computed(() =>
|
||||
message.value.actorId.startsWith(ATTENDEE.BOT_PREFIX)
|
||||
&& message.value.actorType === ATTENDEE.ACTOR_TYPE.BOTS
|
||||
&& (conversation.value.type === CONVERSATION.TYPE.ONE_TO_ONE
|
||||
|| conversation.value.type === CONVERSATION.TYPE.ONE_TO_ONE_FORMER)
|
||||
|| conversation.value.type === CONVERSATION.TYPE.ONE_TO_ONE_FORMER),
|
||||
)
|
||||
|
||||
const isEditable = computed(() => {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export function useSessionIssueHandler(): DeepReadonly<Ref<boolean>> {
|
|||
label: t('spreed', 'Join here'),
|
||||
type: 'primary',
|
||||
callback: () => true,
|
||||
}
|
||||
},
|
||||
],
|
||||
}, (result?: boolean) => {
|
||||
if (result) {
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ window.OCA.WorkflowEngine.registerOperator({
|
|||
color: '#0082c9',
|
||||
operation: '',
|
||||
element: customElementId,
|
||||
options: FlowPostToConversation // backward "compatibility"
|
||||
options: FlowPostToConversation, // backward "compatibility"
|
||||
})
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const migrateDirectLocalStorageToNextcloudBrowserStorage = () => {
|
|||
|| key.startsWith('virtualBackgroundEnabled_')
|
||||
|| key.startsWith('virtualBackgroundType_')
|
||||
|| key.startsWith('virtualBackgroundBlurStrength_')
|
||||
|| key.startsWith('virtualBackgroundUrl_')
|
||||
|| key.startsWith('virtualBackgroundUrl_'),
|
||||
)
|
||||
|
||||
if (storageKeys.length) {
|
||||
|
|
|
|||
|
|
@ -751,7 +751,7 @@ export const regionCodes = {
|
|||
NA: {
|
||||
name: 'Namibia',
|
||||
dial_code: '+264',
|
||||
code: 'NA'
|
||||
code: 'NA',
|
||||
},
|
||||
NR: {
|
||||
name: 'Nauru',
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ function init() {
|
|||
id: 'talk-message',
|
||||
payload: conversation,
|
||||
filterUpdateText: t('spreed', 'Search in conversation: {conversation}', { conversation: conversation.displayName }),
|
||||
filterParams: { conversation: conversation.token }
|
||||
filterParams: { conversation: conversation.token },
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ describe('CapabilitiesManager', () => {
|
|||
const remoteHash = 'abc123'
|
||||
const joinRoomResponseMock = generateOCSResponse({
|
||||
headers: { 'x-nextcloud-talk-proxy-hash': remoteHash },
|
||||
payload: { token, remoteServer }
|
||||
payload: { token, remoteServer },
|
||||
})
|
||||
const responseMock = generateOCSResponse({ payload: mockedCapabilities.spreed })
|
||||
getRemoteCapabilities.mockReturnValue(responseMock)
|
||||
|
|
@ -165,13 +165,13 @@ describe('CapabilitiesManager', () => {
|
|||
it('should update capabilities from server response and mark talk proxy hash as dirty', async () => {
|
||||
const joinRoomResponseMock = generateOCSResponse({
|
||||
headers: { 'x-nextcloud-talk-proxy-hash': `${remoteCapabilities.hash}002` },
|
||||
payload: { token, remoteServer }
|
||||
payload: { token, remoteServer },
|
||||
})
|
||||
const responseMock = generateOCSResponse({
|
||||
payload: {
|
||||
...mockedCapabilities.spreed,
|
||||
features: [...mockedCapabilities.spreed.features, 'new-feature'],
|
||||
}
|
||||
},
|
||||
})
|
||||
getRemoteCapabilities.mockReturnValue(responseMock)
|
||||
await setRemoteCapabilities(joinRoomResponseMock)
|
||||
|
|
@ -182,23 +182,23 @@ describe('CapabilitiesManager', () => {
|
|||
it('should reset dirty proxy hash after second fetch and negative check for changes', async () => {
|
||||
const joinRoomResponseMock = generateOCSResponse({
|
||||
headers: { 'x-nextcloud-talk-proxy-hash': `${remoteCapabilities.hash}003` },
|
||||
payload: { token, remoteServer }
|
||||
payload: { token, remoteServer },
|
||||
})
|
||||
const joinRoomResponseMock2 = generateOCSResponse({
|
||||
headers: { 'x-nextcloud-talk-proxy-hash': `${remoteCapabilities.hash}004` },
|
||||
payload: { token, remoteServer }
|
||||
payload: { token, remoteServer },
|
||||
})
|
||||
const responseMock = generateOCSResponse({
|
||||
payload: {
|
||||
...mockedCapabilities.spreed,
|
||||
features: [...mockedCapabilities.spreed.features, 'new-feature', 'new-feature-2'],
|
||||
}
|
||||
},
|
||||
})
|
||||
const responseMock2 = generateOCSResponse({
|
||||
payload: {
|
||||
...mockedCapabilities.spreed,
|
||||
features: [...mockedCapabilities.spreed.features, 'new-feature', 'new-feature-2'],
|
||||
}
|
||||
},
|
||||
})
|
||||
getRemoteCapabilities.mockReturnValueOnce(responseMock).mockReturnValueOnce(responseMock2)
|
||||
await setRemoteCapabilities(joinRoomResponseMock)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ jest.mock('@nextcloud/capabilities', () => ({
|
|||
config: { federation: { enabled: true, 'outgoing-enabled': true } },
|
||||
'config-local': { federation: [] },
|
||||
},
|
||||
}))
|
||||
})),
|
||||
}))
|
||||
|
||||
describe('coreService', () => {
|
||||
|
|
@ -44,7 +44,7 @@ describe('coreService', () => {
|
|||
},
|
||||
{
|
||||
dummyOption: true,
|
||||
}
|
||||
},
|
||||
)
|
||||
expect(axios.get).toHaveBeenCalledWith(
|
||||
generateOcsUrl('core/autocomplete/get'),
|
||||
|
|
@ -56,7 +56,7 @@ describe('coreService', () => {
|
|||
search: 'search-text',
|
||||
shareTypes: expectedShareTypes,
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ describe('mediaDevicePreferences', () => {
|
|||
kind: 'audioinput',
|
||||
devices: allDevices,
|
||||
inputList: audioInputPreferenceList,
|
||||
inputId: id
|
||||
inputId: id,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ describe('mediaDevicePreferences', () => {
|
|||
kind: 'audioinput',
|
||||
devices: allDevices,
|
||||
inputList: audioInputPreferenceList,
|
||||
inputId: audioInputDeviceA.deviceId
|
||||
inputId: audioInputDeviceA.deviceId,
|
||||
})
|
||||
|
||||
// Assert: should put device A on top of default device
|
||||
|
|
@ -165,7 +165,7 @@ describe('mediaDevicePreferences', () => {
|
|||
kind: 'audioinput',
|
||||
devices: allDevices.filter((device) => !['da1234567890', 'da4567890123'].includes(device.deviceId)),
|
||||
inputList: audioInputPreferenceList,
|
||||
inputId: audioInputDeviceA.deviceId
|
||||
inputId: audioInputDeviceA.deviceId,
|
||||
})
|
||||
|
||||
// Assert
|
||||
|
|
@ -177,7 +177,7 @@ describe('mediaDevicePreferences', () => {
|
|||
kind: 'audioinput',
|
||||
devices: allDevices.filter((device) => !['audioinput', 'videoinput'].includes(device.kind)),
|
||||
inputList: audioInputPreferenceList,
|
||||
inputId: audioInputDeviceA.deviceId
|
||||
inputId: audioInputDeviceA.deviceId,
|
||||
})
|
||||
|
||||
// Assert
|
||||
|
|
@ -189,7 +189,7 @@ describe('mediaDevicePreferences', () => {
|
|||
kind: 'audioinput',
|
||||
devices: allDevices.filter((device) => !['default', 'da1234567890', 'da4567890123'].includes(device.deviceId)),
|
||||
inputList: [audioInputDeviceDefault, audioInputDeviceA],
|
||||
inputId: audioInputDeviceB.deviceId
|
||||
inputId: audioInputDeviceB.deviceId,
|
||||
})
|
||||
|
||||
// Assert: should put device C on top of device B, but not the device A
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ describe('messagesService', () => {
|
|||
limit: CHAT.FETCH_LIMIT,
|
||||
includeLastKnown: 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ describe('messagesService', () => {
|
|||
limit: CHAT.FETCH_LIMIT,
|
||||
includeLastKnown: 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ describe('messagesService', () => {
|
|||
params: {
|
||||
limit: CHAT.FETCH_LIMIT / 2,
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ describe('messagesService', () => {
|
|||
includeLastKnown: 0,
|
||||
markNotificationsAsRead: 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ describe('messagesService', () => {
|
|||
},
|
||||
{
|
||||
dummyOption: true,
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ describe('messagesService', () => {
|
|||
|
||||
expect(axios.delete).toHaveBeenCalledWith(
|
||||
generateOcsUrl('apps/spreed/api/v1/chat/XXTOKENXX/1234'),
|
||||
{ dummyOption: true }
|
||||
{ dummyOption: true },
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ describe('messagesService', () => {
|
|||
expect(axios.put).toHaveBeenCalledWith(
|
||||
generateOcsUrl('apps/spreed/api/v1/chat/XXTOKENXX/1234'),
|
||||
{ message: 'edited message text' },
|
||||
{ dummyOption: true }
|
||||
{ dummyOption: true },
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ describe('messagesService', () => {
|
|||
metaData: '{"x":1}',
|
||||
referenceId: 'reference-id',
|
||||
},
|
||||
{ dummyOption: true }
|
||||
{ dummyOption: true },
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ describe('messagesService', () => {
|
|||
metaData: '{"x":1}',
|
||||
referenceId: expect.stringMatching(/^[a-z0-9]{64}$/),
|
||||
},
|
||||
{ dummyOption: true }
|
||||
{ dummyOption: true },
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ describe('messagesService', () => {
|
|||
{
|
||||
lastReadMessage: 1234,
|
||||
},
|
||||
{ dummyOption: true }
|
||||
{ dummyOption: true },
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ describe('messagesService', () => {
|
|||
{
|
||||
reaction: '👍',
|
||||
},
|
||||
{ dummyOption: true }
|
||||
{ dummyOption: true },
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ describe('messagesService', () => {
|
|||
params: {
|
||||
reaction: '👍',
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ describe('messagesService', () => {
|
|||
generateOcsUrl('apps/spreed/api/v1/reaction/XXTOKENXX/1234'),
|
||||
{
|
||||
dummyOption: true,
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ describe('messagesService', () => {
|
|||
generateOcsUrl('translation/languages'),
|
||||
{
|
||||
dummyOption: true,
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ describe('messagesService', () => {
|
|||
},
|
||||
{
|
||||
dummyOption: true,
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ describe('filesSharingServices', () => {
|
|||
shareWith: 'XXTOKENXX',
|
||||
path: 'path/to/file',
|
||||
referenceId: 'the-reference-id',
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import axios from '@nextcloud/axios'
|
||||
import {
|
||||
showWarning
|
||||
showWarning,
|
||||
} from '@nextcloud/dialogs'
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import {
|
||||
|
|
@ -39,12 +39,12 @@ const joinConversation = async ({ token, forceJoin = false }, options) => {
|
|||
console.error(
|
||||
'Remote address is bruteforce throttled: '
|
||||
+ response.headers.get('X-Nextcloud-Bruteforce-Throttled')
|
||||
+ ' (Request ID: ' + response.headers.get('X-Request-ID') + ')'
|
||||
+ ' (Request ID: ' + response.headers.get('X-Request-ID') + ')',
|
||||
)
|
||||
const throttleMs = parseInt(response.headers.get('X-Nextcloud-Bruteforce-Throttled'), 10)
|
||||
if (throttleMs > 5000) {
|
||||
showWarning(
|
||||
t('spreed', 'Your requests are throttled at the moment due to brute force protection')
|
||||
t('spreed', 'Your requests are throttled at the moment due to brute force protection'),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -187,8 +187,8 @@ const importEmails = async (token, file, testRun = false) => {
|
|||
|
||||
return axios.post(generateOcsUrl('apps/spreed/api/v4/room/{token}/import-emails', { token }), data, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ const importEmails = async (token, file, testRun = false) => {
|
|||
*/
|
||||
const setSessionState = async (token, state) => {
|
||||
return axios.put(generateOcsUrl('apps/spreed/api/v4/room/{token}/participants/state', { token }),
|
||||
{ state }
|
||||
{ state },
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import type {
|
|||
const addReactionToMessage = async function(token: string, messageId: number, selectedEmoji: addReactionParams['reaction'], options: object): addReactionResponse {
|
||||
return axios.post(generateOcsUrl('apps/spreed/api/v1/reaction/{token}/{messageId}', {
|
||||
token,
|
||||
messageId
|
||||
messageId,
|
||||
}, options), {
|
||||
reaction: selectedEmoji,
|
||||
} as addReactionParams, options)
|
||||
|
|
@ -26,7 +26,7 @@ const addReactionToMessage = async function(token: string, messageId: number, se
|
|||
const removeReactionFromMessage = async function(token: string, messageId: number, selectedEmoji: deleteReactionParams['reaction'], options: object): deleteReactionResponse {
|
||||
return axios.delete(generateOcsUrl('apps/spreed/api/v1/reaction/{token}/{messageId}', {
|
||||
token,
|
||||
messageId
|
||||
messageId,
|
||||
}, options), {
|
||||
...options,
|
||||
params: {
|
||||
|
|
@ -38,7 +38,7 @@ const removeReactionFromMessage = async function(token: string, messageId: numbe
|
|||
const getReactionsDetails = async function(token: string, messageId: number, options: object): getReactionsResponse {
|
||||
return axios.get(generateOcsUrl('apps/spreed/api/v1/reaction/{token}/{messageId}', {
|
||||
token,
|
||||
messageId
|
||||
messageId,
|
||||
}, options), options)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ const actions = {
|
|||
|
||||
const currentConversations = context.state.conversations
|
||||
const newConversations = Object.fromEntries(
|
||||
conversations.map((conversation) => [conversation.token, conversation])
|
||||
conversations.map((conversation) => [conversation.token, conversation]),
|
||||
)
|
||||
|
||||
// Remove conversations that are not in the new list
|
||||
|
|
@ -938,7 +938,7 @@ const actions = {
|
|||
callFlag: hasCall ? PARTICIPANT.CALL_FLAG.IN_CALL : PARTICIPANT.CALL_FLAG.DISCONNECTED,
|
||||
lastActivity,
|
||||
callStartTime: hasCall ? lastActivity : 0,
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
|
|
@ -1284,7 +1284,7 @@ const actions = {
|
|||
console.error('Error while unbinding conversation from object: ', error)
|
||||
showError(t('spreed', 'Could not remove the automatic expiration'))
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default { state, mutations, getters, actions }
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ describe('conversationsStore', () => {
|
|||
]
|
||||
|
||||
BrowserStorage.getItem.mockReturnValueOnce(
|
||||
'[{"token":"one_token","attendeeId":"attendee-id-1","lastActivity":1675209600},{"token":"another_token","attendeeId":"attendee-id-2","lastActivity":1672531200}]'
|
||||
'[{"token":"one_token","attendeeId":"attendee-id-1","lastActivity":1675209600},{"token":"another_token","attendeeId":"attendee-id-2","lastActivity":1672531200}]',
|
||||
)
|
||||
|
||||
await store.dispatch('restoreConversations')
|
||||
|
|
@ -928,7 +928,7 @@ describe('conversationsStore', () => {
|
|||
...testConversation,
|
||||
unreadMessages: 0,
|
||||
unreadMention: false,
|
||||
}
|
||||
},
|
||||
})
|
||||
updateLastReadMessage.mockResolvedValue(response)
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ describe('fileUploadStore', () => {
|
|||
token: 'XXTOKENXX',
|
||||
id: store.getters.getUploadsArray('upload-id1')[0][1].temporaryMessage.id,
|
||||
uploadId: 'upload-id1',
|
||||
reason: 'failed-upload'
|
||||
reason: 'failed-upload',
|
||||
})
|
||||
expect(showError).toHaveBeenCalled()
|
||||
expect(console.error).toHaveBeenCalled()
|
||||
|
|
@ -309,7 +309,7 @@ describe('fileUploadStore', () => {
|
|||
token: 'XXTOKENXX',
|
||||
id: store.getters.getUploadsArray('upload-id1')[0][1].temporaryMessage.id,
|
||||
uploadId: 'upload-id1',
|
||||
reason: 'failed-share'
|
||||
reason: 'failed-share',
|
||||
})
|
||||
expect(showError).toHaveBeenCalled()
|
||||
expect(console.error).toHaveBeenCalled()
|
||||
|
|
|
|||
|
|
@ -1412,7 +1412,7 @@ const actions = {
|
|||
|
||||
loadedMessagesOfConversation(context, { token }) {
|
||||
context.commit('loadedMessagesOfConversation', { token })
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default { state, mutations, getters, actions }
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ jest.mock('@nextcloud/capabilities', () => ({
|
|||
'features-local': [],
|
||||
'config-local': { chat: [] },
|
||||
},
|
||||
}))
|
||||
})),
|
||||
}))
|
||||
|
||||
describe('messagesStore', () => {
|
||||
|
|
@ -413,7 +413,7 @@ describe('messagesStore', () => {
|
|||
id: 11,
|
||||
token: TOKEN,
|
||||
message: 'reply to hello',
|
||||
parent: cloneDeep(message)
|
||||
parent: cloneDeep(message),
|
||||
}
|
||||
store.dispatch('processMessage', { token: TOKEN, message: childMessage })
|
||||
|
||||
|
|
@ -542,7 +542,7 @@ describe('messagesStore', () => {
|
|||
id: 11,
|
||||
token: TOKEN,
|
||||
message: 'reply to hello',
|
||||
parent: cloneDeep(message)
|
||||
parent: cloneDeep(message),
|
||||
}
|
||||
store.dispatch('processMessage', { token: TOKEN, message: childMessage })
|
||||
const editedParent = {
|
||||
|
|
@ -786,7 +786,7 @@ describe('messagesStore', () => {
|
|||
payload: {
|
||||
unreadMessages: 0,
|
||||
unreadMention: false,
|
||||
}
|
||||
},
|
||||
})
|
||||
updateLastReadMessage.mockResolvedValue(response)
|
||||
|
||||
|
|
@ -814,7 +814,7 @@ describe('messagesStore', () => {
|
|||
payload: {
|
||||
unreadMessages: 0,
|
||||
unreadMention: false,
|
||||
}
|
||||
},
|
||||
})
|
||||
updateLastReadMessage.mockResolvedValue(response)
|
||||
|
||||
|
|
@ -1728,7 +1728,7 @@ describe('messagesStore', () => {
|
|||
payload: {
|
||||
unreadMessages: 0,
|
||||
unreadMention: false,
|
||||
}
|
||||
},
|
||||
})
|
||||
updateLastReadMessage.mockResolvedValue(response2)
|
||||
store.dispatch('postNewMessage', { token: TOKEN, temporaryMessage, options: { silent: false } }).catch(() => {
|
||||
|
|
@ -1808,7 +1808,7 @@ describe('messagesStore', () => {
|
|||
|
||||
postNewMessage.mockRejectedValueOnce({ isAxiosError: true, response })
|
||||
await expect(
|
||||
store.dispatch('postNewMessage', { token: TOKEN, temporaryMessage, options: { silent: false } })
|
||||
store.dispatch('postNewMessage', { token: TOKEN, temporaryMessage, options: { silent: false } }),
|
||||
).rejects.toMatchObject({ response })
|
||||
|
||||
expect(store.getters.isSendingMessages).toBe(false)
|
||||
|
|
|
|||
|
|
@ -898,7 +898,7 @@ const actions = {
|
|||
finishConnecting()
|
||||
commit('connectionFailed', {
|
||||
token,
|
||||
payload
|
||||
payload,
|
||||
})
|
||||
commit('setInCall', {
|
||||
token,
|
||||
|
|
@ -1243,7 +1243,7 @@ const actions = {
|
|||
Object.values(phoneStates).forEach((phoneState) => {
|
||||
context.commit('setPhoneState', {
|
||||
callid: phoneState.callid,
|
||||
value: phoneState
|
||||
value: phoneState,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
|
@ -1258,7 +1258,7 @@ const actions = {
|
|||
|
||||
clearConnectionFailed(context, token) {
|
||||
context.commit('clearConnectionFailed', token)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default { state, mutations, getters, actions }
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue