mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-23 02:28:45 +00:00
fix use user in group messages
This commit is contained in:
parent
33b50c6c68
commit
e7199e7451
@ -38,6 +38,7 @@ data class AnonymousGroupMessageImpl<T : MessageContent>(
|
|||||||
data class CommonGroupMessageImpl<T : MessageContent>(
|
data class CommonGroupMessageImpl<T : MessageContent>(
|
||||||
override val chat: GroupChat,
|
override val chat: GroupChat,
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageIdentifier,
|
||||||
|
override val user: User,
|
||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
|
@ -296,6 +296,7 @@ internal data class RawMessage(
|
|||||||
null -> CommonGroupMessageImpl(
|
null -> CommonGroupMessageImpl(
|
||||||
chat,
|
chat,
|
||||||
messageId,
|
messageId,
|
||||||
|
from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
|
||||||
date.asDate,
|
date.asDate,
|
||||||
forwarded,
|
forwarded,
|
||||||
edit_date ?.asDate,
|
edit_date ?.asDate,
|
||||||
|
@ -17,4 +17,4 @@ interface AnonymousGroupMessage<T : MessageContent> : GroupMessage<T>, SignedMes
|
|||||||
override val senderChat: GroupChat
|
override val senderChat: GroupChat
|
||||||
get() = chat
|
get() = chat
|
||||||
}
|
}
|
||||||
interface CommonGroupMessage<T : MessageContent> : GroupMessage<T>
|
interface CommonGroupMessage<T : MessageContent> : GroupMessage<T>, FromUserMessage
|
||||||
|
Loading…
Reference in New Issue
Block a user