-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Hi! With the recent update in the bbernhard's Signal CLI REST API, dev branch it is possible to use styles:
**bold**
*italic*
`monospaced`
~stricken-through~
||this is a spoiler||
My suggestion is to hide the one-time passcode from unintended eyes by hiding it under the cut, so it will look like this:
A user will click on blurred rectangle and see it.
For that I've made a small workaround to the code:
lib/Provider/AProvider.php:
108 + $secret = '||'.$secret.'||'
and
lib/Service/Gateway/Signal/Gateway.php:
80 $response = $client->post(
81 $this->config->getUrl() . '/v2/send',
82 [
83 'json' => [
84 + 'text_mode' => 'styled',
85 'message' => $message,
86 'number' => $registered_acct,
87 'recipients' => $recipient_acct
88 ],
89
90 ]
91 );
I understand that this is a workaround, and there should be a nicer solution, eg
- to detach $secret from the whole var $message
- to rewrite the Signal provider Gateway.php: apply styling to $secret and concatenate with the rest in $message.
Metadata
Metadata
Assignees
Labels
No labels
