-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Make send_* functions return an instance of the message sent #68
Comments
neonize/neonize/aioze/client.py Lines 942 to 946 in 863306c
The message gotten from the message builder should be referenced (to be reused) then after the message is successfully sent, the MessageWithContextInfo is extracted from the message and then patched into a new message class with Info and Info.MessageSource set from response.ID and (Chat & Sender) JID respectively neonize/neonize/proto/Neonize_pb2.pyi Line 719 in 863306c
neonize/neonize/utils/message.py Line 11 in 863306c
So we can do the the patching in client.send_message @krypton-byte your thoughts? |
@krypton-byte I can't modify SendResponse since it's connected with the go code and I honestly have no idea how that works Returning a new object instead of SendResponse since protobuf doesn't support inheritance, would break other users code. (especially if they have strict type checking enabled) |
Or is there already a way to do this?
For clarification I need send methods like send_video to return an instance of the message it sent with Message.ID already set could be added to response.Message ?
The text was updated successfully, but these errors were encountered: