Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractMedia ¶
func ExtractMedia(msg *types.WeixinMessage) *types.MessageItem
ExtractMedia finds the first media item by priority: IMAGE > VIDEO > FILE > VOICE. Voice items with a Text field (transcription) are excluded. Falls back to ref_msg media if no direct media is found.
func ExtractText ¶
func ExtractText(msg *types.WeixinMessage) string
ExtractText collects all text from a message's item list, joined with newlines. If a text item has a RefMsg, the quoted message summary is prepended.
func FormatQuotedMessage ¶
FormatQuotedMessage formats a RefMsg as a human-readable quoted message indicator. If the ref has a Title, it returns "[引用: title]". Otherwise, it inspects the referenced message item for media type.
func HasMedia ¶
func HasMedia(item *types.MessageItem) bool
HasMedia returns true if the message item contains any media content (image, video, file, or voice with CDN media).
func MediaCDNInfo ¶
func MediaCDNInfo(item *types.MessageItem) *types.CDNMedia
MediaCDNInfo extracts the CDNMedia from the first media-bearing field found in a message item. Returns nil if no media is present.
Types ¶
This section is empty.