Skip to content
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

Render replies (XEP-0461) #141

Open
nesium opened this issue Sep 5, 2024 · 0 comments
Open

Render replies (XEP-0461) #141

nesium opened this issue Sep 5, 2024 · 0 comments
Assignees
Labels
feature New feature to implement

Comments

@nesium
Copy link
Contributor

nesium commented Sep 5, 2024

Message has a new field replyTo

export class Message {
  // …  
  /**
  * A reference to a message that this message is in reply to.
  */
  readonly replyTo: ReplyTo | undefined;
  // …
}

export class ReplyTo {
  /**
  * The formatted HTML of the replied-to message, if available. Should be used for display.
  */
  readonly body: string | undefined;
  /**
  * The ID of the replied-to message, if available.
  */
  readonly id: string | undefined;
  /**
  * The sender of the replied-to message.
  */
  readonly sender: MessageSender;
  /**
  * The timestamp of the replied-to message, if available.
  */
  readonly timestamp: Date | undefined;
}

Here's an example how Gajim renders replies…
Screenshot 2024-09-05 at 17 23 21

The content in the gray box would be the content of the ReplyTo struct in that example.

Currently replies are read-only since XEP-0461: Message Replies is not immediately compatible with XEP-0481: Content Types in Messages.

But we'll probably want to display replies in threads, like Slack does, anyways.

Refs prose-im/prose-core-client#99

@valeriansaliou valeriansaliou self-assigned this Sep 17, 2024
@valeriansaliou valeriansaliou added the feature New feature to implement label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to implement
Projects
None yet
Development

No branches or pull requests

2 participants