-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/share?msg=foo endpoint using forward message dialog #29874
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
base: develop
Are you sure you want to change the base?
Conversation
expect(defaultDispatcher.dispatch).toHaveBeenCalledWith({ | ||
action: "share", | ||
msg: "Hello", | ||
format: "B", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for sorting out tests. what's going on with the format: "B"
here? shouldn't it be one of the string vals from the SharedFormat enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, it is typed so it probably ought to be one of the types.
I think this is ready now. After some trying & failing with the playwright tests (as commented) I think this is as much as we'll get without expanding this work to make the rooms displayed in the forward dialog update dynamically. |
This is a basic, functional interface to use the ForwardDialog to let users share arbitrary text messages into Matrix, similar to a mobile app's share extension. In addition to the unit / e2e tests, have manually successfully tested:
As of May 14th I've added sharing markdown & html formatted msgs too.
URI scheme is
/#/share?format={format}&msg={msg}
where format is optional, can be one oftext
,html
ormd
but defaults totext
if missing.Checklist
public
/exported
symbols have accurate TSDoc documentation.