Skip to content

State of XMPP specifications

Marc Bauer edited this page Sep 10, 2024 · 6 revisions

Text Formatting

Common Mark
via XEP-0481
XHTML-IM
XEP-0071
Message Styling
XEP-0393
Message Markup
XEP-0394
Formatting Features
Basic Text Formatting
Bold/Italic/Strikethrough
✅/✅/✅ ✅/✅/✅ ✅/✅/✅ ❌/✅/✅
(Named) Links
Block Quotes
Lists
Ordered/Unordered
✅/✅ ✅/✅ ❌/❌ ❌/✅
Inline Code
Code Blocks / with language ✅/✅ ✅/✅ ✅/❌ ✅/❌
Nested Formatting, e.g. bold Text in Link
Implementation Notes
Unique content representation
(I.e. content is not duplicated in message stanza)
Widely supported
Implementation Complexity ➕➕ ➕➕
Security Considerations ➕➕
Compatibility with other XEPs
OMEMO 1 (XEP-0384)
Message Replies (XEP-0461)
Mentions/References (XEP-0372, XEP-0452) ⭕️
(in Fallback)
⭕️
(in Fallback)

Threads

Threads (XEP-0201) don't seem to be widely supported among Jabber clients. Cheogram however does.

Here's the basic flow…

  1. Before you write a message select an icon representing the Thread ID to the left from the textfield.
  2. Send message.
  3. Select "Show only this thread" from the context menu to only show the messages in the selected thread.
  4. To reply to a message tap the message to select its corresponding icon/Thread ID.

This fits well with the specification, which doesn't specify a beginning or an end of a thread. A thread is merely an identifier by which a number of messages are strung together.

We do have different requirements however…

graph TB
    P10["Problem: A message can only be replied to in a thread if the message already has a Thread ID."]
    S10["Solution: Include a Thread ID in every sent message, so that it can act as the beginning of a thread."]
    B10["Background: Our users shouldn't think about creating a thread when they send a (root-level) message. A thread should be created automatically when a user replies to that message."]

    P11["Problem: Threads according to XEP-0201 do not have a notion of a first message."]
    S11["Solution: Use the ID of the first message as the Thread ID, so that the first message can be identified as such."]
    B11["Background: This is needed so that we can display only the first message on the root-level of the conversation. The replies should only be visible after a click."]

    P9["Problem: Clients that do not support threads will not be able to reply to a thread. At best they will include a reply. So these messages will not be displayed as part of the thread."]
    S9["Solution: None"]

    P20["Problem: Other clients won’t include a Thread ID in every sent message."]
    S20["Solution: In order to reply to a message that doesn’t include a Thread ID, use the ID of the replied-to message as the new Thread ID."]

    P40["Problem: Clients that do not support threads will have no indication that a message is a reply to another message."]
    S40["Solution: Include a XEP-0461 reply to the prior message in a thread for each sent message."]

    P30["Problem: Only messages with a Thread ID are considered part of a thread, which the replied-to message doesn't have."]
    P31["Problem: Other clients will not be able to reply in the thread of the original message, but will send a reply (XEP-0461) to that message instead."]
    P32["Problem: Now we won't be able to identify the replied-to message as the first message in the thread (just by looking at it)."]
    S33["Solution: When loading backwards in time we can check if we have Thread IDs that reference a certain message."]
    P35["Problem: When loading backward it would be impossible to decide if the reply should be displayed as part of the thread - unless we show every XEP-0461 reply as part of a thread, which could make sense?"]

    S30["Solution: When replying from Prose include a reply (XEP-0461) to the first message as a workaround. Other clients won't display the first message as part of the thread but at least it is quoted."]
    S31["Solution: To mitigate the workaround in Prose, implement a special handling so that the replied-to message is displayed as the first message in the thread."]

    P12["Problem: Other clients (e.g. Cheogram) are not doing that but use new (random) Thread IDs instead."]
    S12["Solution: Mark Threads that were created with Prose with a custom attribute/element so that we know that there is a first message."]
    S13["Alternative Solution: Try to load message with Thread ID from MAM to check for its existence."]

    P13["Problem: The first message in a thread could still be unknown - without loading all messages from MAM."]
    S14["Solution: Use a custom MAM implementation that can find the first message in a thread."]
    S15["(No) Solution: Show messages inline like regular message, i.e. not in a thread."]

    P10 -->|Solution| S10
    P10 -->|Background| B10
    S10 -->|Leads to| P20

    P9 -->|Solution| S9
    
    P11 -->|Solution| S11
    P11 -->|Background| B11
    S11 -->|Leads to| P12
    P12 -->|Solution| S12
    P12 -->|Alternative| S13

    S12 -->|Leads to| P13
    S13 -->|Leads to| P13
    P13 -->|Solution| S14
    P13 -->|No Solution| S15
    
    P20 -->|Solution| S20
    S20 -->|Leads to| P30
    S20 -->|Leads to| P31
    S20 -->|Leads to| P32
    P32 -->|Background| B11
    P32 -->|Solution| S33
    P30 -->|Solution| S30
    P30 -->|Solution| S31
    P31 -->|Leads to| P35

    P40 -->|Solution| S40
Loading
Clone this wiki locally