Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mtxclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
mtxclient
Commits
be423a67
Commit
be423a67
authored
6 years ago
by
Konstantinos Sideris
Browse files
Options
Downloads
Patches
Plain Diff
Url encode transcation ids
parent
ae2258d8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/mtxclient/http/client.hpp
+3
-2
3 additions, 2 deletions
include/mtxclient/http/client.hpp
lib/http/client.cpp
+3
-2
3 additions, 2 deletions
lib/http/client.cpp
with
6 additions
and
4 deletions
include/mtxclient/http/client.hpp
+
3
−
2
View file @
be423a67
...
...
@@ -522,8 +522,9 @@ mtx::http::Client::send_room_message(const std::string &room_id,
const
Payload
&
payload
,
Callback
<
mtx
::
responses
::
EventId
>
callback
)
{
const
auto
api_path
=
"/client/r0/rooms/"
+
room_id
+
"/send/"
+
mtx
::
events
::
to_string
(
Event
)
+
"/"
+
txn_id
;
const
auto
api_path
=
"/client/r0/rooms/"
+
room_id
+
"/send/"
+
mtx
::
events
::
to_string
(
Event
)
+
"/"
+
mtx
::
client
::
utils
::
url_encode
(
txn_id
);
put
<
Payload
,
mtx
::
responses
::
EventId
>
(
api_path
,
payload
,
callback
);
}
...
...
This diff is collapsed.
Click to expand it.
lib/http/client.cpp
+
3
−
2
View file @
be423a67
...
...
@@ -439,11 +439,12 @@ Client::flow_response(const std::string &user,
void
Client
::
send_to_device
(
const
std
::
string
&
event_type
,
const
std
::
string
&
txid
,
const
std
::
string
&
tx
n_
id
,
const
nlohmann
::
json
&
body
,
ErrCallback
callback
)
{
const
auto
api_path
=
"/client/r0/sendToDevice/"
+
event_type
+
"/"
+
txid
;
const
auto
api_path
=
"/client/r0/sendToDevice/"
+
event_type
+
"/"
+
mtx
::
client
::
utils
::
url_encode
(
txn_id
);
put
<
nlohmann
::
json
>
(
api_path
,
body
,
callback
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment