mirror of
https://github.com/severian-dev/sucker.severian.dev.git
synced 2025-10-28 12:45:55 +00:00
match token fix
This commit is contained in:
@@ -85,7 +85,8 @@ function extractPersonaName(content: string): string | null {
|
|||||||
function parseConversationToken(content: string | undefined | null): string | null {
|
function parseConversationToken(content: string | undefined | null): string | null {
|
||||||
if (!content) return null;
|
if (!content) return null;
|
||||||
const trimmed = content.trim();
|
const trimmed = content.trim();
|
||||||
const match = trimmed.match(/^\[sucker:conv=([a-z0-9]+)\]$/i);
|
// Find token anywhere in the content, not just when the whole string equals the token
|
||||||
|
const match = trimmed.match(/\[sucker:conv=([a-z0-9]+)\]/i);
|
||||||
if (match) {
|
if (match) {
|
||||||
return match[1];
|
return match[1];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user