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

get_message for messages of type interactive or list_reply #68

Open
soerenetler opened this issue Feb 13, 2023 · 6 comments
Open

get_message for messages of type interactive or list_reply #68

soerenetler opened this issue Feb 13, 2023 · 6 comments

Comments

@soerenetler
Copy link
Collaborator

Hello again,
I think get_message should be renamed to get_message_text (current naming is ambiguous, it is not clear if the function returns the message object or the text). And I would argue it should return the button_reply -> title for messages of type interactive and the list_reply -> title and list_reply -> description for list_reply
What do you think?

@Kalebu
Copy link
Contributor

Kalebu commented Feb 22, 2023

Hi @soerenetler

Didn't quite get you on the second part, Can you please clarify more on that ?

@soerenetler
Copy link
Collaborator Author

If the user does not write the answer but uses buttons the answer ist of type interactive. I think in this case the get_message(_text) function should return the title of the button_reply object (wich is the text of the button. Same goes for list_reply.

@filipporomani
Copy link
Contributor

@Kalebu I'm actually trying some fixes locally for this. Is it ok to create a Message() object which is returned to the user on get_message() method call?
All the message params will be gathered via the object to simplify the usage.

@soerenetler
Copy link
Collaborator Author

I like this approach :) I think this also goes along with #32

@filipporomani
Copy link
Contributor

I've create a fork of this repo!
https://github.com/filipporomani/whatsapp
I'll mostly contribute on my fork now. Give it a look if you want!

@filipporomani
Copy link
Contributor

@soerenetler hello!
This is not done, but it's a starting point (editing everything and testing is pretty hard).
filipporomani/whatsapp-python@3c21e36
I have just commited the first changes. Message() is now an object, I'll work on this next days and I'll release the new version when ready.
Sorry for putting this here but idk where else to write it.

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

3 participants