@hoverlover/cc-discord 0.5.0 → 0.5.2
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/server/index.ts +1 -6
- package/server/trace-thread.ts +5 -0
package/package.json
CHANGED
package/server/index.ts
CHANGED
|
@@ -40,12 +40,7 @@ setInterval(cleanupOldAttachments, 10 * 60 * 1000);
|
|
|
40
40
|
cleanupOldAttachments();
|
|
41
41
|
|
|
42
42
|
const client = new Client({
|
|
43
|
-
intents: [
|
|
44
|
-
GatewayIntentBits.Guilds,
|
|
45
|
-
GatewayIntentBits.GuildMessages,
|
|
46
|
-
GatewayIntentBits.MessageContent,
|
|
47
|
-
GatewayIntentBits.GuildMessageThreads,
|
|
48
|
-
],
|
|
43
|
+
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
|
|
49
44
|
});
|
|
50
45
|
|
|
51
46
|
function requireAuth(req: Request, res: Response): boolean {
|
package/server/trace-thread.ts
CHANGED
|
@@ -253,6 +253,11 @@ async function flushTraceEvents(client: Client) {
|
|
|
253
253
|
const byChannel = new Map<string, TraceEvent[]>();
|
|
254
254
|
for (const evt of events) {
|
|
255
255
|
const ch = evt.channel_id || "unknown";
|
|
256
|
+
// Skip non-snowflake channel IDs (e.g. "claude" from legacy agent routing)
|
|
257
|
+
if (ch !== "unknown" && !/^\d{15,22}$/.test(ch)) {
|
|
258
|
+
postedIds.push(evt.id);
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
256
261
|
const arr = byChannel.get(ch) || [];
|
|
257
262
|
arr.push(evt);
|
|
258
263
|
byChannel.set(ch, arr);
|