fix: remove legacy telegram json parsing from router#64
Merged
yihong0618 merged 1 commit intoPsiACE:mainfrom Feb 24, 2026
Merged
fix: remove legacy telegram json parsing from router#64yihong0618 merged 1 commit intoPsiACE:mainfrom
yihong0618 merged 1 commit intoPsiACE:mainfrom
Conversation
This code was originally used to parse MessageBus JSON format, but became obsolete after MessageBus removal in 9808f0f. It also had bugs with None values and string JSON inputs. Current flow: Channel.get_session_prompt() -> runtime.handle_input() -> router.route_user(raw_text)
yihong0618
approved these changes
Feb 24, 2026
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.
Bug Description
Run command:
These inputs (among others) trigger an
AttributeError:{"message": null}→parsedis adict, butparsed.get("message")returnsNone→ subsequentNone.startswith(...)call crashes."这是一个合法的JSON"→parsedis astrwithout a.get()method →AttributeErroris raised immediately.Investigation
While investigating the
AttributeErrorbugs, I traced the JSON parsing code back to commit1fe1c18(2026-02-10), where it was added to handle the old MessageBus communication format (InboundMessage.render()). However, after commit9808f0f(2026-02-14) removed the MessageBus, this parsing became obsolete—the current architecture passes plain text directly fromChannel.get_session_prompt()throughruntime.handle_input()torouter.route_user(). All modern channels (telegram/discord/base) no longer use the JSON wrapper format, making this code safe to remove.Current Data Flow:
Channel.get_session_prompt() -> runtime.handle_input() -> router.route_user(raw_text)Resolution
Delete this dead code to reduce complexity and clarify the router's scope.
Verification