Skip to content

Commit

Permalink
fix fileId get
Browse files Browse the repository at this point in the history
  • Loading branch information
boogiedk committed Dec 6, 2023
1 parent 34c9e27 commit b1324d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SerfBot/TelegramBot.fs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ let updateArrivedMessage (ctx: UpdateContext) =
| Some { MessageId = messageId; Chat = chat; Text = text; Photo = photo; Caption = caption } ->
let user = ctx.Update.Message.Value.From.Value

let base64Img = if photo.IsSome then handleFiles photo.Value[0].FileId ctx else ""
let base64Img = if photo.IsSome then handleFiles (Array.last photo.Value).FileId ctx else ""
let message = if text.IsSome then text.Value elif caption.IsSome then caption.Value else ""
match isValidUser user.Id with
| Some () ->
logInfo $"Message from user {Option.get user.Username} received: " //{Option.get text}
logInfo $"Message from user {Option.get user.Username} received: {message}"
let command, userMessage = extractCommand message
let commandType =
match command with
Expand Down

0 comments on commit b1324d9

Please sign in to comment.