@qihoo/tuitui-openclaw-channel 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/chat_record.ts +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qihoo/tuitui-openclaw-channel",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "maintainers": [
5
5
  {
6
6
  "name": "huzunjie",
@@ -381,9 +381,19 @@ export async function getPostChainByChatId(
381
381
 
382
382
  async function getChannelPostList(
383
383
  account: any,
384
- channel_id: string,
384
+ chatId: string,
385
385
  options: GetChatRecordOptions = {}
386
386
  ): Promise<any> {
387
+ // chatId 支持2种格式:
388
+ // case1: 在频道中发送:总结当前频道最近3天内容,此时传入 chatId 为sessionKey,即 teams_xxx
389
+ // case2: 在私聊中发消息:总结频道 12345 最近3天内容,此时传入 chatId 为 12345
390
+ let channel_id = chatId;
391
+ const guessType = guessChatType(chatId);
392
+ if(guessType == CHAT_TYPE_CHANNEL) {
393
+ const target = teamsParseChatId(chatId);
394
+ channel_id = target.channel_id;
395
+ }
396
+
387
397
  const channel_info = await getChannelInfoById(account, channel_id);
388
398
  const team_id = channel_info?.team_id;
389
399
  const channel_name = channel_info?.name;