1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

fix use user in group messages

This commit is contained in:
InsanusMokrassar 2020-11-12 21:46:33 +06:00
parent 33b50c6c68
commit e7199e7451
3 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@ data class AnonymousGroupMessageImpl<T : MessageContent>(
data class CommonGroupMessageImpl<T : MessageContent>(
override val chat: GroupChat,
override val messageId: MessageIdentifier,
override val user: User,
override val date: DateTime,
override val forwardInfo: ForwardInfo?,
override val editDate: DateTime?,

View File

@ -296,6 +296,7 @@ internal data class RawMessage(
null -> CommonGroupMessageImpl(
chat,
messageId,
from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
date.asDate,
forwarded,
edit_date ?.asDate,

View File

@ -17,4 +17,4 @@ interface AnonymousGroupMessage<T : MessageContent> : GroupMessage<T>, SignedMes
override val senderChat: GroupChat
get() = chat
}
interface CommonGroupMessage<T : MessageContent> : GroupMessage<T>
interface CommonGroupMessage<T : MessageContent> : GroupMessage<T>, FromUserMessage