hermes-agent/plugins/platforms/line
Teknium 7309f3bef7 fix(line): map inbound message types to the correct MessageType
The LINE adapter classified every non-text inbound message as
`MessageType.IMAGE`, which doesn't exist on the enum — so any image,
video, audio, file, sticker, or location message raised AttributeError
the moment it was constructed.

Beyond fixing the crash, every non-text message was being collapsed onto
a single type. The gateway routes on MessageType (voice → STT, files →
document handling, etc.), so misclassification silently mishandled media.
Replace the inline ternary with a `_LINE_MESSAGE_TYPES` lookup that maps
each LINE webhook type to its proper enum member (audio → VOICE to match
how Telegram/WhatsApp treat voice notes), falling back to TEXT for
unknown types. Adds regression tests covering the mapping and the old
AttributeError.

Co-authored-by: Sahibzada Allahyar <94376830+sahibzada-allahyar@users.noreply.github.com>
2026-06-04 21:55:20 -07:00
..
__init__.py feat(gateway): add LINE Messaging API platform plugin (#23197) 2026-05-10 06:40:46 -07:00
adapter.py fix(line): map inbound message types to the correct MessageType 2026-06-04 21:55:20 -07:00
plugin.yaml feat(gateway): add LINE Messaging API platform plugin (#23197) 2026-05-10 06:40:46 -07:00