@chbo297/infoflow 2026.3.8 → 2026.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/bot.ts +2 -2
- package/src/channel.ts +1 -1
- package/src/reply-dispatcher.ts +2 -2
package/package.json
CHANGED
package/src/bot.ts
CHANGED
|
@@ -103,10 +103,10 @@ function checkWatchMentioned(
|
|
|
103
103
|
return undefined;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
/** Check if message content matches the configured watchRegex regex pattern */
|
|
106
|
+
/** Check if message content matches the configured watchRegex regex pattern. Uses "s" (dotAll) so that . matches newlines in multi-line messages. */
|
|
107
107
|
function checkWatchRegex(mes: string, pattern: string): boolean {
|
|
108
108
|
try {
|
|
109
|
-
return new RegExp(pattern, "
|
|
109
|
+
return new RegExp(pattern, "is").test(mes);
|
|
110
110
|
} catch {
|
|
111
111
|
return false;
|
|
112
112
|
}
|
package/src/channel.ts
CHANGED
|
@@ -207,7 +207,7 @@ export const infoflowPlugin: ChannelPlugin<ResolvedInfoflowAccount> = {
|
|
|
207
207
|
outbound: {
|
|
208
208
|
deliveryMode: "direct",
|
|
209
209
|
chunkerMode: "markdown",
|
|
210
|
-
textChunkLimit:
|
|
210
|
+
textChunkLimit: 2048,
|
|
211
211
|
chunker: (text, limit) => getInfoflowRuntime().channel.text.chunkText(text, limit),
|
|
212
212
|
sendText: async ({ cfg, to, text, accountId }) => {
|
|
213
213
|
logVerbose(`[infoflow:sendText] to=${to}, accountId=${accountId}`);
|
package/src/reply-dispatcher.ts
CHANGED
|
@@ -148,8 +148,8 @@ export function createInfoflowReplyDispatcher(params: CreateInfoflowReplyDispatc
|
|
|
148
148
|
messageText = atPrefix + text;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
// Chunk text to
|
|
152
|
-
const chunks = core.channel.text.chunkText(messageText,
|
|
151
|
+
// Chunk text to 2048 chars max (Infoflow limit)
|
|
152
|
+
const chunks = core.channel.text.chunkText(messageText, 2048);
|
|
153
153
|
// Only include @mentions in the first chunk (avoid duplicate @s)
|
|
154
154
|
let isFirstChunk = true;
|
|
155
155
|
|