Files
CCandCigarrr d18ba12cd1 fix(feishu): parse at/markdown in post content and handle sticker/media messages (#726)
Previously the post-content parser silently dropped `at` and `markdown`
elements. Messages combining an @mention with an image (which arrive as
post type rather than text type) lost the mention entirely because
stripMentions runs against a placeholder that was never extracted. Any
post whose text lives inside a `markdown` element was also dropped.

Also add handlers for `sticker` and `media` (video) message types so
they are no longer silently ignored. Stickers are delivered as image
attachments; videos are surfaced as `[video: <name>, Xs]` with the
thumbnail as an image when available.

Changes:
- postElement struct: add UserId / UserName fields for at elements.
- extractPostParts: handle at (resolves bot strip, @all, @<name>) and
  markdown (passthrough text). Affects the main inbound post path.
- extractPostPlainText (quoted/reply chain path): handle a, at,
  markdown and img so quoted context is no longer truncated.
- dispatchMessage: add sticker and media cases with graceful
  fallbacks on download failure.
- Tests for the new at/markdown behavior in both paths.

Co-authored-by: Cigarrr <cigarrr@users.noreply.github.com>
2026-04-27 14:37:36 +08:00
..