Bug
_send_raw_message() in gateway/platforms/feishu.py (line 3220) hardcodes receive_id_type as "chat_id":
request = self._build_create_message_request("chat_id", body)
When cron job delivery targets a user's open_id (prefix ou_), Feishu API rejects it with:
[230001] Your request contains an invalid request parameter, ext=invalid receive_id
Because ou_xxx is not a valid chat_id — it's an open_id, and requires receive_id_type="open_id".
Expected
receive_id_type should be inferred from the ID prefix:
┌────────┬──────────┬─────────────────┐
│ Prefix │ Type │ receive_id_type │
├────────┼──────────┼─────────────────┤
│ ou_ │ open_id │ open_id │
├────────┼──────────┼─────────────────┤
│ on_ │ union_id │ union_id │
├────────┼──────────┼─────────────────┤
│ oc_ │ chat_id │ chat_id │
└────────┴──────────┴─────────────────┘
Suggested Fix
if chat_id.startswith("ou_"):
rid_type = "open_id"
elif chat_id.startswith("on_"):
rid_type = "union_id"
else:
rid_type = "chat_id"
request = self._build_create_message_request(rid_type, body)
Reproduce
1. Create a cron job with deliver: "feishu:ou_xxxxx"
2. Job executes successfully but delivery fails with invalid receive_id
3. Group targets (oc_) work fine since they match the hardcoded "chat_id" type
Bug
_send_raw_message()ingateway/platforms/feishu.py(line 3220) hardcodesreceive_id_typeas"chat_id":