UNPKG

@tgsnake/core

Version:

Pure Telegram MTProto library for nodejs

19 lines (18 loc) 467 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SeqNo = void 0; class SeqNo { contentRMsgSend; seqNo; constructor() { this.contentRMsgSend = 0; this.seqNo = 0; } getSeqNo(isContentRelated) { this.seqNo = this.contentRMsgSend * 2 + (isContentRelated ? 1 : 0); if (isContentRelated) this.contentRMsgSend += 1; return this.seqNo; } } exports.SeqNo = SeqNo;