Context clientId telegram
nik27090 opened this issue · 1 comments
nik27090 commented
context.clientId
returns chat id for telegram
Example for bug reproduction.
Difference between IDs can be seen only in group chats, because in a private chats clientId == chatId
action {
var userId: Long? = null
request.telegram?.run {
userId = message.from?.id
}
if (userId != null) {
reactions.say(userId.toString())
reactions.say(context.clientId)
}
}
morfeusys commented
@nik27090 not sure why did you recognise this as a bug. clientId
is used by JAICF as an unique identifier of sender to manage their BotContext
using ContextManager
. In this case it doesn't matter, is it a group chat in Telegram or not. If the user sends a request to the bot in the group chat, JAICF manages the "shared" bot's context meaning that every member of the chat will see the reaction.