@imessaging/telegram-mtproto 0.8.16 → 0.8.17

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imessaging/telegram-mtproto",
3
- "version": "0.8.16",
3
+ "version": "0.8.17",
4
4
  "description": "Telegram MTProto user-account transport for imessaging",
5
5
  "keywords": [
6
6
  "messaging",
@@ -417,7 +417,7 @@ export class TelegramMtprotoTransport
417
417
  if (threadId !== undefined && (!Number.isSafeInteger(threadId) || threadId <= 0)) {
418
418
  throw new Error(`Telegram thread id must be a positive integer: ${threadId}`);
419
419
  }
420
- // Как у send: тема без ответа — ответ на её корень; ответ в теме — ещё и topMsgId.
420
+ // Тема: topMsgId всегда, без него черновик ложится в General; без ответа — ответ на корень темы.
421
421
  const replyToMsgId = replyTo ?? threadId;
422
422
  const ft = draft.format ? formatText(draft.text, draft.format) : undefined;
423
423
  const save = async (peer: Api.TypeInputPeer) =>
@@ -430,7 +430,7 @@ export class TelegramMtprotoTransport
430
430
  ? {
431
431
  replyTo: new Api.InputReplyToMessage({
432
432
  replyToMsgId,
433
- ...(replyTo && threadId ? { topMsgId: threadId } : {}),
433
+ ...(threadId ? { topMsgId: threadId } : {}),
434
434
  }),
435
435
  }
436
436
  : {}),