mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 17:28:28 +00:00
fix: normalize gateway dev mode detection
This commit is contained in:
@@ -121,10 +121,7 @@ type TelegramTextLinkEntity = {
|
||||
url?: string;
|
||||
};
|
||||
|
||||
export function expandTextLinks(
|
||||
text: string,
|
||||
entities?: TelegramTextLinkEntity[] | null,
|
||||
): string {
|
||||
export function expandTextLinks(text: string, entities?: TelegramTextLinkEntity[] | null): string {
|
||||
if (!text || !entities?.length) return text;
|
||||
|
||||
const textLinks = entities
|
||||
@@ -140,7 +137,8 @@ export function expandTextLinks(
|
||||
for (const entity of textLinks) {
|
||||
const linkText = text.slice(entity.offset, entity.offset + entity.length);
|
||||
const markdown = `[${linkText}](${entity.url})`;
|
||||
result = result.slice(0, entity.offset) + markdown + result.slice(entity.offset + entity.length);
|
||||
result =
|
||||
result.slice(0, entity.offset) + markdown + result.slice(entity.offset + entity.length);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user