You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the message_handler callback function only receives the Threema message object as an argument at the e2e.add_callback_route function when the web route is triggered. That works great for simple one-way communication. But when you try to send a replay to a user via Threema Gateway, it gets problematic because you can’t create a second Connection Instance. After all, the aiohttp web service is already using one, and the Connection implementation will raise an error if you create a second instance without the first being closed.
A possible solution would be to forward the Connection Instance as an additional argument to the message_handler callback function to make it accessible. Then, it can be used to interact with the Threema Gateway from the function without needing to open a second Connection Instance.
The message object that is currently passed as an argument to the function can’t be used to access the Connection Instance because it only contains it as a private _connection object
The text was updated successfully, but these errors were encountered:
Hello,
Currently, the
message_handler
callback function only receives the Threema message object as an argument at thee2e.add_callback_route
function when the web route is triggered. That works great for simple one-way communication. But when you try to send a replay to a user via Threema Gateway, it gets problematic because you can’t create a second Connection Instance. After all, the aiohttp web service is already using one, and the Connection implementation will raise an error if you create a second instance without the first being closed.A possible solution would be to forward the Connection Instance as an additional argument to the
message_handler
callback function to make it accessible. Then, it can be used to interact with the Threema Gateway from the function without needing to open a second Connection Instance.The message object that is currently passed as an argument to the function can’t be used to access the Connection Instance because it only contains it as a private
_connection
objectThe text was updated successfully, but these errors were encountered: