测试:修复刚才的提交
This commit is contained in:
@@ -253,7 +253,7 @@ function createChatRec(sender: boolean, curTime: Date, targetRoleId) {
|
|||||||
*/
|
*/
|
||||||
async function updateRecentChats(sender: boolean, roleId: string, targetRoleId: string, curTime: Date) {
|
async function updateRecentChats(sender: boolean, roleId: string, targetRoleId: string, curTime: Date) {
|
||||||
const chatInfo = await ChatInfoModel.findInfo(roleId);
|
const chatInfo = await ChatInfoModel.findInfo(roleId);
|
||||||
let recentPrivateChats = chatInfo?.recentPrivateChats||[];
|
let recentPrivateChats: PrivateChatRec[] = chatInfo?.recentPrivateChats||[]
|
||||||
const recIdx = recentPrivateChats.findIndex(chat => { return chat.targetRoleId === targetRoleId });
|
const recIdx = recentPrivateChats.findIndex(chat => { return chat.targetRoleId === targetRoleId });
|
||||||
if (recIdx === -1) {
|
if (recIdx === -1) {
|
||||||
recentPrivateChats.push(createChatRec(sender, curTime, targetRoleId));
|
recentPrivateChats.push(createChatRec(sender, curTime, targetRoleId));
|
||||||
|
|||||||
Reference in New Issue
Block a user