mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
fix: accept legacy 'dm' in session key parsing for backward compat
getDmHistoryLimitFromSessionKey now accepts both :dm: and :direct: to ensure old session keys continue to work correctly.
This commit is contained in:
@@ -58,7 +58,8 @@ export function getDmHistoryLimitFromSessionKey(
|
||||
const kind = providerParts[1]?.toLowerCase();
|
||||
const userIdRaw = providerParts.slice(2).join(":");
|
||||
const userId = stripThreadSuffix(userIdRaw);
|
||||
if (kind !== "direct") {
|
||||
// Accept both "direct" (new) and "dm" (legacy) for backward compat
|
||||
if (kind !== "direct" && kind !== "dm") {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user