Problem with obtaining SenderId #227
Answered
by
ForNeVeR
cherryymerryy
asked this question in
Q&A
-
How to convert SenderId with TdApi.MessageSender type to long type? |
Beta Was this translation helpful? Give feedback.
Answered by
ForNeVeR
Aug 1, 2024
Replies: 1 comment
-
Depending on its type ( Something like this: // MessageSender sender
long id = sender switch {
MessageSenderChat c => c.ChatId,
MessageSenderUser u => u.UserId,
_ => throw new Exception("oops")
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cherryymerryy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depending on its type (
MessageSenderChat
orMessageSenderUser
), pick the propertyUserId
orChatId
.Something like this: