Merge pull request #1977 from Wolfsblvt/swipe-id-attribute

Include swipeid to all messages in chat
This commit is contained in:
Cohee 2024-03-28 00:13:51 +02:00 committed by GitHub
commit 03582a8ec6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -1855,6 +1855,7 @@ function insertSVGIcon(mes, extra) {
function getMessageFromTemplate({
mesId,
swipeId,
characterName,
isUser,
avatarImg,
@ -1872,6 +1873,7 @@ function getMessageFromTemplate({
const mes = messageTemplate.clone();
mes.attr({
'mesid': mesId,
'swipeid': swipeId,
'ch_name': characterName,
'is_user': isUser,
'is_system': !!isSystem,
@ -2018,6 +2020,7 @@ function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll = true
let params = {
mesId: forceId ?? chat.length - 1,
swipeId: mes.swipe_id ?? 0,
characterName: mes.name,
isUser: mes.is_user,
avatarImg: avatarImg,