Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context clientId telegram #108

Open
nik27090 opened this issue Nov 3, 2020 · 1 comment
Open

Context clientId telegram #108

nik27090 opened this issue Nov 3, 2020 · 1 comment

Comments

@nik27090
Copy link

nik27090 commented Nov 3, 2020

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 added a commit that referenced this issue Nov 11, 2020
@nikvoloshin nikvoloshin linked a pull request Nov 12, 2020 that will close this issue
@morfeusys
Copy link
Contributor

@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.

@nikvoloshin nikvoloshin removed a link to a pull request Nov 13, 2020
@morfeusys morfeusys reopened this Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants