fix(line): classify image messages as photos - #38528
Closed
sahibzada-allahyar wants to merge 1 commit into
Closed
Conversation
sahibzada-allahyar
force-pushed
the
tui-38235-line-image
branch
from
June 4, 2026 02:12
91e1d0d to
23c371f
Compare
Contributor
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes LINE inbound image messages being classified with the nonexistent
MessageType.IMAGEenum value. Hermes' shared gateway enum usesMessageType.PHOTO, and downstream media/photo handling checks forPHOTO, so LINE image messages could fail before being routed as image messages.Related Issue
Fixes #38235
Type of Change
Changes Made
plugins/platforms/line/adapter.py: classify non-text LINE inbound messages from_handle_message_event()asMessageType.PHOTOinstead ofMessageType.IMAGE.Real behavior proof
Behavior addressed: a LINE webhook image event now produces a Hermes
MessageEventwithmessage_type=photo, while preserving the downloaded media path and media type.Real environment tested: local Hermes source checkout on macOS, using the repository's existing Python 3.11 virtualenv from
/Users/allahyar/Documents/fastino-tasks/hermes-agent/.venv, against this PR branch.Exact command rerun after rebasing this branch:
Evidence after fix:
Before source evidence:
Observed result after fix: the LINE image event is converted into a
MessageEventusing the sharedPHOTOenum value, so it can follow the gateway's existing photo/media handling path.What was not tested: a live LINE webhook with real channel credentials. The focused probe exercises the adapter's inbound image event path directly.
Verification
passed with no output.
Notes
No new committed regression test is included in this PR; the change is a one-line enum correction and the direct runtime probe above covers the reported image-message behavior.