Skip to content

Better replies support #142

Description

@selfhoster1312

There's a few shortcomings with the current implementation of message replies:

  • sending a message to a network currently expects to return the associated message ID immediately, but this prevents an asynchronous design:
    • most networks will require a response from the server to assign the ID, blocking the main thread
    • XMPP does not even get the assigned ID as a response to the sending action, but in a separate message
  • a bridged message may be split into several message for sending, and the current implementation only allows to return 1 message ID:
    • a message may be split because of length limit
    • or because separate attachments (eg. images) require separate messages
  • matterbridge does not store original message bodies internally, and thus requires each bridge to destructure/reformat the original message quote on its own (which is error prone, and would force each bridge to implement a message cache to keep the texts around)
  • from my understanding, the mapping of original ID -> bridge IDs is untyped, therefore collisions are possible actually it's not exactly typed but all IDs are prefixed with the protocol, see here

We should definitely come up with a new architecture which would allow us to send every new message in a separate goroutine and stop blocking the main thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions