зеркало из https://github.com/nextcloud/spreed.git
Allow to delete shared files and objects from the web
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
625439702e
Коммит
7c325c6936
|
@ -276,10 +276,10 @@ describe('MessageButtonsBar.vue', () => {
|
|||
testDeleteMessageVisible(false)
|
||||
})
|
||||
|
||||
test('hides delete action for file messages', () => {
|
||||
test('show delete action for file messages', () => {
|
||||
messageProps.message = '{file}'
|
||||
messageProps.messageParameters.file = {}
|
||||
testDeleteMessageVisible(false)
|
||||
testDeleteMessageVisible(true)
|
||||
})
|
||||
|
||||
test('hides delete action on other people messages for non-moderators', () => {
|
||||
|
|
|
@ -304,14 +304,9 @@ export default {
|
|||
return false
|
||||
}
|
||||
|
||||
const isObjectShare = this.message === '{object}'
|
||||
&& this.messageParameters?.object
|
||||
|
||||
return (moment(this.timestamp * 1000).add(6, 'h')) > moment()
|
||||
&& this.messageType === 'comment'
|
||||
&& (this.messageType === 'comment' || this.messageType === 'voice-message')
|
||||
&& !this.isDeleting
|
||||
&& !this.isFileShare
|
||||
&& !isObjectShare
|
||||
&& (this.isMyMsg
|
||||
|| (this.conversation.type !== CONVERSATION.TYPE.ONE_TO_ONE
|
||||
&& (this.participant.participantType === PARTICIPANT.TYPE.OWNER
|
||||
|
|
Загрузка…
Ссылка в новой задаче