feat(chat): migrate chat protocol to lock detail
This commit is contained in:
@@ -86,9 +86,13 @@ export class ChatRepository implements IChatRepository {
|
||||
return ChatMessage.from({
|
||||
...message.toJson(),
|
||||
content,
|
||||
isPrivate: message.isPrivate ?? true,
|
||||
privateLocked: false,
|
||||
privateHint: null,
|
||||
lockDetail: {
|
||||
...message.lockDetail,
|
||||
locked: false,
|
||||
showContent: true,
|
||||
showUpgrade: false,
|
||||
hint: null,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -155,12 +159,12 @@ export class ChatRepository implements IChatRepository {
|
||||
return LocalMessage.from({
|
||||
id: message.id,
|
||||
role: message.role,
|
||||
type: message.type,
|
||||
content: message.content,
|
||||
createdAt: message.createdAt,
|
||||
imageUrl: message.imageUrl,
|
||||
isPrivate: message.isPrivate,
|
||||
privateLocked: message.privateLocked,
|
||||
privateHint: message.privateHint,
|
||||
audioUrl: message.audioUrl,
|
||||
image: message.image,
|
||||
lockDetail: message.lockDetail,
|
||||
sessionId: "",
|
||||
});
|
||||
}
|
||||
@@ -170,12 +174,12 @@ export class ChatRepository implements IChatRepository {
|
||||
return ChatMessage.from({
|
||||
id: local.id,
|
||||
role: local.role,
|
||||
type: local.type,
|
||||
content: local.content,
|
||||
createdAt: local.createdAt,
|
||||
imageUrl: local.imageUrl,
|
||||
isPrivate: local.isPrivate,
|
||||
privateLocked: local.privateLocked,
|
||||
privateHint: local.privateHint,
|
||||
audioUrl: local.audioUrl,
|
||||
image: local.image,
|
||||
lockDetail: local.lockDetail,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user