-
Notifications
You must be signed in to change notification settings - Fork 109
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
Support all threema url actions #215
Conversation
So how did you finally do it? (Just give the ones an overview, who do not want to dive into the code.) |
@rugk The url actions are only supported/handled inside Threema Web for sent and received messges. I also tried to click threema://add-Links on different websites and nothing happened. Then i read the issue again, especially this comment from dbrgn where he said
|
src/directives/threema_action.ts
Outdated
}; | ||
|
||
const getThreemaActionHandler = (name: string) => { | ||
switch (name) { |
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.
Query parameters should be case-insensitve 😉
This could be solved using name.toLowerCase()
src/directives/threema_action.ts
Outdated
&& node.tagName.toLowerCase() === 'a') { | ||
|
||
const link = (node as HTMLElement).innerText; | ||
if (link !== undefined && link.startsWith('threema://')) { |
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.
Same as my first comment. Protocol should also be case-insensitive
Great, that's at least somehow, although it of course does not fulfil #190 completely. |
UriService
withparseQueryParams
functionThreemaAction
directivecompose
directiveI tested various combinations of predefined compose text, drafts, clicking on back button and clicking on other conversations. I hope I didn't miss some edge case. If a draft is defined, it's overwriten, but when pushing the back button in the header without typing anything, the draft should be restored when going back to the conversation.
Fixes #190.