Prevent the copy handler from unveiling tombstoned messages

This commit is contained in:
Tim Düsterhus 2020-03-25 23:01:20 +01:00
parent f097e770cf
commit 560b010a65
Signed by: TimWolla
GPG Key ID: 8FF75566094168AF
1 changed files with 8 additions and 3 deletions

View File

@ -1,10 +1,10 @@
/*
* Copyright (c) 2010-2018 Tim Düsterhus.
* Copyright (c) 2010-2020 Tim Düsterhus.
*
* Use of this software is governed by the Business Source License
* included in the LICENSE file.
*
* Change Date: 2022-11-27
* Change Date: 2024-03-25
*
* On the date above, in accordance with the Business Source
* License, use of this software will be governed by version 2
@ -14,11 +14,12 @@
define([ '../Helper'
, 'WoltLabSuite/Core/Date/Util'
, 'WoltLabSuite/Core/Dom/Change/Listener'
, 'WoltLabSuite/Core/Language'
, 'WoltLabSuite/Core/User'
, 'WoltLabSuite/Core/Dom/Traverse'
, '../DataStructure/EventEmitter'
, '../DataStructure/RedBlackTree/Tree'
], function (Helper, DateUtil, DomChangeListener, User, DOMTraverse, EventEmitter, Tree) {
], function (Helper, DateUtil, DomChangeListener, Language, User, DOMTraverse, EventEmitter, Tree) {
"use strict";
const enableAutoscroll = Symbol('enableAutoscroll')
@ -315,6 +316,10 @@ define([ '../Helper'
if (!message) return
if (el.classList.contains('tombstone')) {
return `[${message.formattedTime}] ${Language.get('chat.messageType.be.bastelstu.chat.messageType.tombstone.message')}`
}
const elem = elBySel('.chatMessage', el)
let body