(placeholder: string, documentId: BigInteger)
| 107 | const offset = this.calculateOffset(this.text); |
| 108 | const length = placeholder.length; // Simple length calculation |
| 109 | this.text += placeholder; |
| 110 | |
| 111 | this.entities.push( |
| 112 | new Api.MessageEntityCustomEmoji({ |
| 113 | offset, |
| 114 | length, |
| 115 | documentId |
| 116 | }) |
| 117 | ); |
| 118 | } |
| 119 | |
| 120 | private calculateOffset(text: string): number { |
| 121 | // Telegram uses UTF-16 code units for offset calculation |
| 122 | return text.length; |
| 123 | } |
| 124 |
no test coverage detected