Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ export default {
if (this.previewAvailable !== 'yes') {
return PREVIEW_TYPE.MIME_ICON
}

const maxGifSize = getCapabilities()?.caps?.spreed?.config?.previews?.['max-gif-size'] || 3145728
const maxGifSize = getCapabilities()?.spreed?.config?.previews?.['max-gif-size'] || 3145728
if (this.mimetype === 'image/gif' && this.size <= maxGifSize) {
return PREVIEW_TYPE.DIRECT
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/NewMessageForm/NewMessageForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
import AdvancedInput from './AdvancedInput/AdvancedInput'
import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'
import { postNewMessage } from '../../services/messagesService'
import { getCapabilities } from '@nextcloud/capabilities'
import Quote from '../Quote'
import Actions from '@nextcloud/vue/dist/Components/Actions'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
Expand Down Expand Up @@ -195,7 +196,8 @@ export default {
},

canShareAndUploadFiles() {
return !this.currentUserIsGuest && !this.isReadOnly
const allowed = getCapabilities()?.spreed?.config?.attachments?.allowed
return allowed && !this.currentUserIsGuest && !this.isReadOnly
},

attachmentFolder() {
Expand Down