Skip to content

Commit

Permalink
Funogram: fix compilation against new version
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Dec 1, 2024
1 parent 568f59d commit 3f70083
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Emulsion.Telegram/Funogram.fs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ module MessageConverter =

let (|ForwardFrom|_|) (message: FunogramMessage) =
match message.ForwardOrigin with
| Some(User { SenderUser = user }) -> Some (getUserDisplayName user)
| Some(MessageOrigin.User { SenderUser = user }) -> Some (getUserDisplayName user)
| Some(HiddenUser { SenderUserName = name }) -> Some name
| Some(MessageOrigin.Chat { SenderChat = chat }) -> Some (getChatDisplayName chat)
| Some(MessageOrigin.Channel { Chat = chat }) -> Some (getChatDisplayName chat)
Expand Down
4 changes: 3 additions & 1 deletion Emulsion.Tests/Telegram/FunogramTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ let private createForwardedMessage from (forwarded: Funogram.Telegram.Types.Mess
ForwardOrigin =
forwarded.From
|> Option.map (
fun u -> User(MessageOriginUser.Create(``type`` = "user", date = forwarded.Date, senderUser = u))
fun u -> MessageOrigin.User(
MessageOriginUser.Create(``type`` = "user", date = forwarded.Date, senderUser = u)
)
)
Text = forwarded.Text }

Expand Down

0 comments on commit 3f70083

Please sign in to comment.