feat(session): add per-group session reset configuration#8134
Closed
tylerliu612 wants to merge 3 commits into
Closed
feat(session): add per-group session reset configuration#8134tylerliu612 wants to merge 3 commits into
tylerliu612 wants to merge 3 commits into
Conversation
Add support for configuring session reset settings at the per-group level, not just globally or by type/channel. Changes: - Add TelegramGroupSessionConfig type with reset config options - Add session field to TelegramGroupConfig - Add Zod schema validation for group session config - Add resolveGroupResetConfig helper to extract group-level reset - Modify reset policy resolution to prioritize group config This allows configuring different reset behaviors for different groups, e.g., TTS groups can auto-reset after 1 minute idle while family groups keep normal session continuity. Closes openclaw#8122
- Add accountId field to GroupKeyResolution type - Propagate AccountId from MsgContext to GroupKeyResolution - Use accountId in resolveGroupResetConfig for deterministic lookup - Fallback to scanning all accounts when accountId is not available Fixes nondeterministic behavior when same groupId exists in multiple accounts
bfc1ccb to
f92900f
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
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.
Summary
Add support for configuring session reset settings at the per-group level, not just globally or by type/channel.
Motivation
Closes #8122
Some use cases require different session reset behaviors for different groups:
Changes
TelegramGroupSessionConfigtype with reset config options (mode,atHour,idleMinutes)sessionfield toTelegramGroupConfigresolveGroupResetConfighelper to extract group-level reset configExample Configuration
{ "channels": { "telegram": { "groups": { "-5117810383": { "requireMention": false, "session": { "reset": { "mode": "idle", "idleMinutes": 1 } } } } } } }Testing
Greptile Overview
Greptile Summary
Adds per-Telegram-group session reset configuration (
channels.telegram.groups.*.session.reset) and updates session initialization to prefer group-level reset overrides over channel/type defaults. Also extends the Telegram config types and Zod validation schema to accept the newsessionblock under group configs.Confidence Score: 4/5
(2/5) Greptile learns from your feedback when you react with thumbs up/down!