Class WeComInboundMapper
java.lang.Object
io.agentscope.extensions.channel.wecom.WeComInboundMapper
Parses a decrypted WeCom callback XML body into an
InboundMessage.
Text messages (MsgType=text, single-user app message) map to their content. Media
messages (MsgType image / voice / video) map to a neutral
marker text plus the ChannelMediaMetadata contract: the provider material identifiers
are preserved verbatim and decoding them (a token-authenticated media/get exchange,
valid for three days) is left to the application. Other inbound types (event, location, link,
...) are returned as Optional.empty() so the caller can ack the webhook without
dispatching to the agent.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
WeComInboundMapper
-
-
Method Details
-
map
Builds anInboundMessagefrom a decrypted WeCom message XML. Text messages map to their content; media messages map to a neutral marker plusChannelMediaMetadataentries. Returns empty for other payload kinds or malformed events so the caller can ack without dispatching. -
extractMsgId
Returns theMsgIdfield if present, used by the idempotency store.
-