mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-21 21:30:08 +00:00
Prevent the copy handler from unveiling tombstoned messages
This commit is contained in:
parent
f097e770cf
commit
560b010a65
@ -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
|
* Use of this software is governed by the Business Source License
|
||||||
* included in the LICENSE file.
|
* 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
|
* On the date above, in accordance with the Business Source
|
||||||
* License, use of this software will be governed by version 2
|
* License, use of this software will be governed by version 2
|
||||||
@ -14,11 +14,12 @@
|
|||||||
define([ '../Helper'
|
define([ '../Helper'
|
||||||
, 'WoltLabSuite/Core/Date/Util'
|
, 'WoltLabSuite/Core/Date/Util'
|
||||||
, 'WoltLabSuite/Core/Dom/Change/Listener'
|
, 'WoltLabSuite/Core/Dom/Change/Listener'
|
||||||
|
, 'WoltLabSuite/Core/Language'
|
||||||
, 'WoltLabSuite/Core/User'
|
, 'WoltLabSuite/Core/User'
|
||||||
, 'WoltLabSuite/Core/Dom/Traverse'
|
, 'WoltLabSuite/Core/Dom/Traverse'
|
||||||
, '../DataStructure/EventEmitter'
|
, '../DataStructure/EventEmitter'
|
||||||
, '../DataStructure/RedBlackTree/Tree'
|
, '../DataStructure/RedBlackTree/Tree'
|
||||||
], function (Helper, DateUtil, DomChangeListener, User, DOMTraverse, EventEmitter, Tree) {
|
], function (Helper, DateUtil, DomChangeListener, Language, User, DOMTraverse, EventEmitter, Tree) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const enableAutoscroll = Symbol('enableAutoscroll')
|
const enableAutoscroll = Symbol('enableAutoscroll')
|
||||||
@ -315,6 +316,10 @@ define([ '../Helper'
|
|||||||
|
|
||||||
if (!message) return
|
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)
|
const elem = elBySel('.chatMessage', el)
|
||||||
|
|
||||||
let body
|
let body
|
||||||
|
Loading…
Reference in New Issue
Block a user