Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add connection argument to the message_handler callback on the e2e.add_callback_route function #70

Closed as not planned
@nisutec

Description

@nisutec

Hello,

Currently, themessage_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 themessage_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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp