| 685 | if (cls.includes("Geo")) return "location"; |
| 686 | if (cls.includes("Venue")) return "venue"; |
| 687 | if (cls.includes("Contact")) return "contact"; |
| 688 | if (cls.includes("Poll")) return "poll"; |
| 689 | if (cls.includes("Document")) return "document"; |
| 690 | return "media"; |
| 691 | } |
| 692 | |
| 693 | function mediaFallbackText(msg: Api.Message): string { |
| 694 | const kind = getMediaKind(msg); |
| 695 | if (!kind) return ""; |
| 696 | const map: Record<string, string> = { |
| 697 | photo: "[照片]", video: "[视频]", round: "[圆形视频]", animation: "[动画]", |
| 698 | sticker: "[贴纸]", voice: "[语音]", audio: "[音频]", document: "[文件]", |
| 699 | location: "[位置]", venue: "[地点]", contact: "[联系人]", poll: "[投票]", media: "[媒体]" |
| 700 | }; |
| 701 | return map[kind] || "[媒体]"; |