opencode-router 0.11.129 → 0.11.131

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/dist/bridge.js CHANGED
@@ -1478,6 +1478,14 @@ export async function startBridge(config, logger, reporter, deps = {}) {
1478
1478
  text: inboundText,
1479
1479
  ...(normalizedParts.length ? { parts: normalizedParts } : {}),
1480
1480
  };
1481
+ if (inbound.fromMe) {
1482
+ logger.debug({
1483
+ channel: inbound.channel,
1484
+ identityId: inbound.identityId,
1485
+ peerId: inbound.peerId,
1486
+ }, "inbound ignored (self-authored)");
1487
+ return;
1488
+ }
1481
1489
  const reporterInboundText = inbound.text || summarizeInboundPartsForReporter(inbound.parts) || "[empty message]";
1482
1490
  logger.debug({
1483
1491
  channel: inbound.channel,
package/dist/telegram.js CHANGED
@@ -172,6 +172,14 @@ export function createTelegramAdapter(identity, config, logger, onMessage, media
172
172
  const msg = ctx.message;
173
173
  if (!msg?.chat)
174
174
  return;
175
+ const fromId = typeof msg.from?.id === "number" ? msg.from.id : null;
176
+ const selfId = typeof ctx.me?.id === "number" ? ctx.me.id : null;
177
+ const fromMe = fromId !== null && selfId !== null && fromId === selfId;
178
+ const fromBot = msg.from?.is_bot === true;
179
+ if (fromMe || fromBot) {
180
+ log.debug({ chatId: msg.chat.id, fromId, selfId }, "telegram message ignored (bot-originated)");
181
+ return;
182
+ }
175
183
  const mediaCandidates = extractMediaCandidates(msg);
176
184
  const hasMedia = mediaCandidates.length > 0;
177
185
  const chatType = msg.chat.type;
@@ -232,6 +240,7 @@ export function createTelegramAdapter(identity, config, logger, onMessage, media
232
240
  text: textForPrompt,
233
241
  parts,
234
242
  raw: msg,
243
+ fromMe,
235
244
  });
236
245
  }
237
246
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-router",
3
- "version": "0.11.129",
3
+ "version": "0.11.131",
4
4
  "description": "opencode-router: Slack + Telegram bridge + directory routing for a running opencode server",
5
5
  "private": false,
6
6
  "type": "module",