mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-06-01 08:12:39 +00:00
mod/notification-matrix: use :convert for url-encoding
This commit is contained in:
parent
58afe6d632
commit
f4d653f9c0
1 changed files with 2 additions and 3 deletions
|
|
@ -242,7 +242,6 @@
|
||||||
|
|
||||||
:global FetchUserAgentStr;
|
:global FetchUserAgentStr;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global UrlEncode;
|
|
||||||
|
|
||||||
:global MatrixAccessToken;
|
:global MatrixAccessToken;
|
||||||
:global MatrixHomeServer;
|
:global MatrixHomeServer;
|
||||||
|
|
@ -251,8 +250,8 @@
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
/tool/fetch check-certificate=yes-without-crl output=none \
|
/tool/fetch check-certificate=yes-without-crl output=none \
|
||||||
http-header-field=({ [ $FetchUserAgentStr $0 ] }) http-method=post http-data="" \
|
http-header-field=({ [ $FetchUserAgentStr $0 ] }) http-method=post http-data="" \
|
||||||
("https://" . $MatrixHomeServer . "/_matrix/client/r0/rooms/" . [ $UrlEncode $MatrixRoom ] . \
|
("https://" . $MatrixHomeServer . "/_matrix/client/r0/rooms/" . [ :convert to=url $MatrixRoom ] . \
|
||||||
"/join?access_token=" . [ $UrlEncode $MatrixAccessToken ]) as-value;
|
"/join?access_token=" . [ :convert to=url $MatrixAccessToken ]) as-value;
|
||||||
$LogPrint debug $0 ("Joined the room.");
|
$LogPrint debug $0 ("Joined the room.");
|
||||||
} do={
|
} do={
|
||||||
$LogPrint error $0 ("Failed joining the room: " . $Err);
|
$LogPrint error $0 ("Failed joining the room: " . $Err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue