diff --git a/src/VahterBanBot/Bot.fs b/src/VahterBanBot/Bot.fs index e0f7e43..c1d12a3 100644 --- a/src/VahterBanBot/Bot.fs +++ b/src/VahterBanBot/Bot.fs @@ -389,15 +389,16 @@ let onUpdate (message: Message) = task { use banOnReplyActivity = botActivity.StartActivity("onUpdate") - %banOnReplyActivity - .SetTag("chatId", message.Chat.Id) - .SetTag("chatUsername", message.Chat.Username) // early return if if we can't process it if isNull message || isNull message.From then logger.LogWarning "Received update without message" else + %banOnReplyActivity + .SetTag("chatId", message.Chat.Id) + .SetTag("chatUsername", message.Chat.Username) + // upserting user to DB let! _ = DbUser.newUser message.From