mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-04-28 09:15:57 +00:00
fix: fix for username with html tags
This commit is contained in:
parent
0fc4b0f217
commit
68766d5a6d
@ -196,7 +196,11 @@ function extractMetaData(meta, key) {
|
||||
module.exports = (bot) => {
|
||||
bot.command(['d', 'device'], spamwatchMiddleware, async (ctx) => {
|
||||
const userId = ctx.from.id;
|
||||
const userName = ctx.from.first_name;
|
||||
let userName = String(ctx.from.first_name);
|
||||
|
||||
if(userName.includes("<") && userName.includes(">")) {
|
||||
userName = userName.replace("<", "").replace(">", "");
|
||||
}
|
||||
|
||||
const phone = ctx.message.text.split(" ").slice(1).join(" ");
|
||||
if (!phone) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user