Skip to content

IM: Send ping message to existing group when re-selecting a session #92

@FridayLiu

Description

@FridayLiu

Problem

When a user re-selects an existing session in P2P chat (Feishu/DingTalk), the adapter tells the user "this session already has a group chat, please use that group" — but the group may have sunk to the bottom of the users chat list, making it hard to find.

Proposed Solution

For group-based IM adapters (Feishu & DingTalk), when a user selects an existing session that already has a bound group:

  1. Send a short ping message to the existing group (e.g. "📌 Session activated — continue chatting here")
  2. This causes the group to surface to the top of the users IM chat list
  3. Optionally still send the P2P redirect hint

Affected Adapters

  • electron/main/channels/feishu/feishu-adapter.ts — session selection flow (~line 1020-1072)
  • electron/main/channels/dingtalk/dingtalk-adapter.ts — session selection flow (~line 725-773)
  • Both check hasGroupForConversation() and currently only send a P2P text redirect

Not Affected

P2P-based adapters (Teams, Telegram, WeCom) handle session switching within the P2P chat directly — no group ping needed.

Implementation Notes

  • Use existing transport.sendText(chatId, text) to ping the group
  • Group chatId is available via sessionMapper.getGroupChatIdForConversation(conversationId)
  • Keep message concise to avoid noise

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions