You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/shared/helper/converse-helper.ts

16 lines
422 B
TypeScript

import { getCachedConverseInfo } from '../cache/cache';
import type { ChatConverseInfo } from '../model/converse';
import { appendUserDMConverse } from '../model/user';
/**
* 确保私信会话存在
*/
export async function ensureDMConverse(
converseId: string
): Promise<ChatConverseInfo> {
const converse = await getCachedConverseInfo(converseId);
await appendUserDMConverse(converseId);
return converse;
}