mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
telegram-chat: handle missing username
This commit is contained in:
parent
490a738af1
commit
9d1cf87489
1 changed files with 3 additions and 1 deletions
|
@ -125,7 +125,9 @@ $WaitFullyConnected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else={
|
} else={
|
||||||
$LogPrintExit2 warning $0 ("Received a message from untrusted contact '" . $FromUserName . "' (ID " . $FromID . ")!") false;
|
$LogPrintExit2 warning $0 ("Received a message from untrusted contact " . \
|
||||||
|
[ $IfThenElse ($FromUserName = false) "without username" ("'" . $FromUserName . "'") ] . \
|
||||||
|
" (ID " . $FromID . ")!") false;
|
||||||
:if ($Text ~ ("^! *" . [ $EscapeForRegEx $Identity ] . "\$")) do={
|
:if ($Text ~ ("^! *" . [ $EscapeForRegEx $Identity ] . "\$")) do={
|
||||||
$SendTelegram2 ({ origin=$0; chatid=$ChatID; silent=false; \
|
$SendTelegram2 ({ origin=$0; chatid=$ChatID; silent=false; \
|
||||||
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
|
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
|
||||||
|
|
Loading…
Reference in a new issue