Feature: common ChatMember fields, I had to write the following code:
val user = when (chatMember) {
is ChatMember.Owner -> chatMember.user
is ChatMember.Member -> chatMember.user
is ChatMember.Left -> chatMember.user
is ChatMember.Banned -> chatMember.user
is ChatMember.Restricted -> chatMember.user
is ChatMember.Administrator -> chatMember.user
}
Serializable
ChatMember
fields, I had to write the following code: