-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
basic implementation of an /share?msg=foo endpoint #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.
This is a basic PoC to use the ForwardDialog to let users share arbitrary text messages into Matrix, similar to a mobile app's share extension. Needs UTs, but 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.