MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / send_message

Function send_message

agents/master-coordinator/main.py:168–182  ·  view source on GitHub ↗

发送消息的辅助函数 Args: text: 消息内容 chat_id: 聊天 ID(优先使用) user_id: 用户 open_id(备选)

(text: str, chat_id: Optional[str] = None, user_id: Optional[str] = None)

Source from the content-addressed store, hash-verified

166
167
168def send_message(text: str, chat_id: Optional[str] = None, user_id: Optional[str] = None) -> Dict[str, Any]:
169 """
170 发送消息的辅助函数
171
172 Args:
173 text: 消息内容
174 chat_id: 聊天 ID(优先使用)
175 user_id: 用户 open_id(备选)
176 """
177 if chat_id:
178 return send_text(chat_id, text, use_chat_id=True)
179 elif user_id:
180 return send_text(user_id, text)
181 else:
182 return {"success": False, "error": "No chat_id or user_id"}
183
184
185def format_direction_label(direction: str) -> str:

Callers 9

handle_expand_pushMethod · 0.85
handle_reviewer_watchMethod · 0.85
handle_show_profileMethod · 0.85
handle_profile_updateMethod · 0.85
handle_unknownMethod · 0.85

Calls 1

send_textFunction · 0.85

Tested by

no test coverage detected