-
-
Notifications
You must be signed in to change notification settings - Fork 964
Messages with type of contact
can not be handled
#920
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
Comments
Hi @imami You are correct, there are various cases where the incoming messages are simply handled by @php-telegram-bot/developers What do you guys think? This is obviously a backwards compatibility issue, because until now everything that hasn't explicitly been defined simply went to |
@noplanman Thanks, I fixed this small issue on Also there's another pull request #919 , I would be appreciated if you can take a look at it. |
We could simply add some code to example Following this scheme many new commands would've to be added (photos, videos etc), I guess? Is it actually worth it? I don't thnk so because this way we are forcing developers to split their logic between multiple commands just to handle a MESSAGE. What if someone creates a bot that accepts any file like sound, image, video and converts them or creates a shared link? Hope you understand what I mean... |
@jacklul Absolutely understand what you mean! I think a clean solution would be to introduce all the new classes and handle them separately, forwarding to That should work, right? |
I think that could be great if you can implement some kind of Router for messages, something like the way Laravel handles request. Thats more developer friendly 😉 |
@imami For the current version of the code, there probably won't be any message routing set up like that. But it's been spoken about for the next greater version. |
@jacklul What do you think about implementing all commands individually and falling back to |
Now when I think about it... We could implement a check that "binding" to execute |
Simply add support for handling different types of text messages by |
Right, I see what you mean. Proper way to manage commands would be to allow all types of user commands (e.g. The way the commands are managed at the moment is really not pretty, which is what #689 and #919 try to fix too. It's been put off till now, because it will pretty definitely break backwards compatibility and require a new command manager to be coded (which is on the todo since #232) |
0.56.0 allows this, by defining a custom |
Messages with type of
contact
does not resolve to any of SystemCommands or UserCommands.so when a user shared his own contact, it can not be handled by this package.
Required Information
Webhook
andgetUpdates
Expected behaviour
It should be processable by a Command (if exists).
Actual behaviour
This type of messages are not resolved to any command!
Steps to reproduce
Keyboard
, and aKeyboadButton
with'request_contact' => true
contact
The text was updated successfully, but these errors were encountered: