( chatEntity: any, messageId: number, )
| 232 | |
| 233 | if (chatEntity?.username) { |
| 234 | return `https://t.me/${chatEntity.username}/${messageId}`; |
| 235 | } |
| 236 | |
| 237 | if (chatEntity instanceof Api.Channel && chatEntity?.id) { |
| 238 | return `https://t.me/c/${chatEntity.id}/${messageId}`; |
| 239 | } |
| 240 | |
| 241 | return undefined; |
| 242 | } |
| 243 | |
| 244 | function describeServiceMessage(message: any): string { |
| 245 | const actionName = String(message?.action?.className || "") |
| 246 | .replace(/^MessageAction/, "") |
| 247 | .trim(); |
| 248 | return actionName ? `[服务消息:${actionName}]` : "[服务消息]"; |
| 249 | } |
| 250 | |
| 251 | function describeDocumentMessage(message: any): string { |
| 252 | const attributes = Array.isArray(message?.document?.attributes) |
no outgoing calls
no test coverage detected