Skip to content

Would like to have receiver, serialize and deserialize functions on RoomInvitation #1823

@windmemory

Description

@windmemory

Is your feature request related to a problem? Please describe.
Trying to implementing a feature that user could accept room invitation and view room invitation in web page. So I need two more functions:

  • One function enables the ability to retrieve/regenerate the room invitation, and accept when the user triggered the accept action.
  • The other one could return back the invitation's receiver, for invitation that is not sent by bot, it is clear that the sender and the receiver, but if the invitation is sent by myself, it is impossible currently to know whom the invitation is sent to. So I want to have this function that tells me who is the receiver.

Describe the solution you'd like
I would like to have two or three more functions provide by RoomInvitation class.

  • to(): Promise<Contact> to retrieve the receiver info
  • stringify(): Promise<string> to serialize the RoomInvitation
  • static parse(): Promise<RoomInvitation> to deserialize the string and generate the room invitation object again, so we can call accept on it to accept the invitation.

Describe alternatives you've considered
No alternatives yet considered.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions