fix style column of recorded message is null

This commit is contained in:
geekgeekrun
2025-04-26 10:52:42 +08:00
parent f770e7fe06
commit 353fc60891
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ export class ChatMessageRecord {
@Column({
nullable: true
})
style?: 'sent' | 'receive';
style?: 'sent' | 'received';
@Column({
nullable: true

View File

@@ -189,7 +189,7 @@ const attachRequestsListener = async (target: Target) => {
mappedItem.mid = it.mid
mappedItem.encryptFromUserId = it.isSelf ? currentUserInfo.encryptUserId : bossInfo.encryptBossId
mappedItem.encryptToUserId = it.isSelf ? bossInfo.encryptBossId : currentUserInfo.encryptUserId
mappedItem.style = it.style
mappedItem.style = it.isSelf ? 'sent' : 'received'
mappedItem.type = it.type
mappedItem.time = it.time ? new Date(it.time) : null
mappedItem.text = it.text