(raw: string)
| 224 | return Math.min(value, MAX_MESSAGE_COUNT); |
| 225 | } |
| 226 | |
| 227 | function buildChatMessageLink( |
| 228 | chatEntity: any, |
| 229 | messageId: number, |
| 230 | ): string | undefined { |
| 231 | if (!messageId) return undefined; |
| 232 | |
| 233 | if (chatEntity?.username) { |
| 234 | return `https://t.me/${chatEntity.username}/${messageId}`; |
| 235 | } |