Include swipeid to all messages in chat
This commit is contained in:
parent
4e7cd6d63b
commit
11b3162aa4
|
@ -1855,6 +1855,7 @@ function insertSVGIcon(mes, extra) {
|
||||||
|
|
||||||
function getMessageFromTemplate({
|
function getMessageFromTemplate({
|
||||||
mesId,
|
mesId,
|
||||||
|
swipeId,
|
||||||
characterName,
|
characterName,
|
||||||
isUser,
|
isUser,
|
||||||
avatarImg,
|
avatarImg,
|
||||||
|
@ -1872,6 +1873,7 @@ function getMessageFromTemplate({
|
||||||
const mes = messageTemplate.clone();
|
const mes = messageTemplate.clone();
|
||||||
mes.attr({
|
mes.attr({
|
||||||
'mesid': mesId,
|
'mesid': mesId,
|
||||||
|
'swipeid': swipeId,
|
||||||
'ch_name': characterName,
|
'ch_name': characterName,
|
||||||
'is_user': isUser,
|
'is_user': isUser,
|
||||||
'is_system': !!isSystem,
|
'is_system': !!isSystem,
|
||||||
|
@ -2018,6 +2020,7 @@ function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll = true
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
mesId: forceId ?? chat.length - 1,
|
mesId: forceId ?? chat.length - 1,
|
||||||
|
swipeId: mes.swipes?.indexOf(mes.mes) ?? mes.swipe_id ?? 0,
|
||||||
characterName: mes.name,
|
characterName: mes.name,
|
||||||
isUser: mes.is_user,
|
isUser: mes.is_user,
|
||||||
avatarImg: avatarImg,
|
avatarImg: avatarImg,
|
||||||
|
|
Loading…
Reference in New Issue