(msg: Api.Message)
| 155 | return String(item.value ?? item.id ?? ""); |
| 156 | } |
| 157 | |
| 158 | function targetFromCurrentChat(msg: Api.Message): string { |
| 159 | const chat: any = (msg as any).chat; |
| 160 | if (chat?.username) return `@${chat.username}`; |
| 161 | if ((msg as any).chatId) return String((msg as any).chatId); |
| 162 | return stablePeerPart((msg as any).peerId); |
| 163 | } |
| 164 | |
| 165 | function messageText(msg: Api.Message): string { |
no test coverage detected