mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
chore: follow-up cleanup for Feishu topic thread fix
- Remove dead metadata.get('reply_to') fallback in _send_raw_message;
nothing in the codebase ever sets 'reply_to' inside a metadata dict —
the key only appears as a top-level send_voice() keyword argument
- Simplify _status_thread_metadata construction in run.py to use a
single dict literal instead of create-then-mutate pattern; the
or-{} guard was dead since source.thread_id implies _progress_thread_id
is also set for Feishu
- Add yuqian@zmetasoft.com to AUTHOR_MAP for contributor attribution
This commit is contained in:
parent
441ef75d15
commit
28299afc21
3 changed files with 8 additions and 4 deletions
|
|
@ -4091,7 +4091,7 @@ class FeishuAdapter(BasePlatformAdapter):
|
|||
) -> Any:
|
||||
effective_reply_to = reply_to
|
||||
if not effective_reply_to and metadata and metadata.get("thread_id"):
|
||||
effective_reply_to = metadata.get("reply_to_message_id") or metadata.get("reply_to")
|
||||
effective_reply_to = metadata.get("reply_to_message_id")
|
||||
reply_in_thread = bool((metadata or {}).get("thread_id"))
|
||||
if effective_reply_to:
|
||||
body = self._build_reply_message_body(
|
||||
|
|
|
|||
|
|
@ -13178,14 +13178,17 @@ class GatewayRunner:
|
|||
# Bridge sync status_callback → async adapter.send for context pressure
|
||||
_status_adapter = self.adapters.get(source.platform)
|
||||
_status_chat_id = source.chat_id
|
||||
_status_thread_metadata = {"thread_id": _progress_thread_id} if _progress_thread_id else None
|
||||
if source.platform == Platform.FEISHU and source.thread_id and event_message_id:
|
||||
# Feishu topics only keep messages inside the topic when they are
|
||||
# sent via the reply API with reply_in_thread=true. Status/interim,
|
||||
# approval, and stream-consumer paths usually only receive metadata,
|
||||
# so carry the triggering message id as a Feishu-specific fallback.
|
||||
_status_thread_metadata = dict(_status_thread_metadata or {})
|
||||
_status_thread_metadata["reply_to_message_id"] = event_message_id
|
||||
_status_thread_metadata: Optional[Dict[str, Any]] = {
|
||||
"thread_id": _progress_thread_id,
|
||||
"reply_to_message_id": event_message_id,
|
||||
}
|
||||
else:
|
||||
_status_thread_metadata = {"thread_id": _progress_thread_id} if _progress_thread_id else None
|
||||
|
||||
def _status_callback_sync(event_type: str, message: str) -> None:
|
||||
if not _status_adapter or not _run_still_current():
|
||||
|
|
|
|||
|
|
@ -771,6 +771,7 @@ AUTHOR_MAP = {
|
|||
"steven_chanin@alum.mit.edu": "stevenchanin",
|
||||
"fiver@example.com": "halmisen",
|
||||
"mayq0422@gmail.com": "yuqianma",
|
||||
"yuqian@zmetasoft.com": "yuqianma",
|
||||
"scott@bubble.local": "bassings",
|
||||
"highland0971@users.noreply.github.com": "highland0971",
|
||||
"sudolewis@gmail.com": "lewislulu",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue