Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
🥺
conduwuit
Commits
0183d003
Unverified
Commit
0183d003
authored
3 years ago
by
Jonas Platte
Browse files
Options
Downloads
Patches
Plain Diff
Revert rename of Ruma<_> parameters
parent
f7124550
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/client_server/membership.rs
+6
-6
6 additions, 6 deletions
src/client_server/membership.rs
src/client_server/push.rs
+5
-5
5 additions, 5 deletions
src/client_server/push.rs
src/client_server/sync.rs
+6
-7
6 additions, 7 deletions
src/client_server/sync.rs
with
17 additions
and
18 deletions
src/client_server/membership.rs
+
6
−
6
View file @
0183d003
...
...
@@ -93,15 +93,15 @@ pub async fn join_room_by_id_route(
/// - If the server does not know about the room: asks other servers over federation
#[cfg_attr(
feature
=
"conduit_bin"
,
post(
"/_matrix/client/r0/join/<_>"
,
data
=
"<
req
>"
)
post(
"/_matrix/client/r0/join/<_>"
,
data
=
"<
body
>"
)
)]
#[tracing::instrument(skip(db,
req
))]
#[tracing::instrument(skip(db,
body
))]
pub
async
fn
join_room_by_id_or_alias_route
(
db
:
DatabaseGuard
,
req
:
Ruma
<
join_room_by_id_or_alias
::
Request
<
'_
>>
,
body
:
Ruma
<
join_room_by_id_or_alias
::
Request
<
'_
>>
,
)
->
ConduitResult
<
join_room_by_id_or_alias
::
Response
>
{
let
body
=
req
.body
;
let
sender_user
=
req
.sender_user
.as_ref
()
.expect
(
"user is authenticated"
)
;
let
sender_user
=
body
.sender_user
.as_deref
()
.expect
(
"user is authenticated"
)
;
let
body
=
body
.body
;
let
(
servers
,
room_id
)
=
match
Box
::
<
RoomId
>
::
try_from
(
body
.room_id_or_alias
)
{
Ok
(
room_id
)
=>
{
...
...
@@ -129,7 +129,7 @@ pub async fn join_room_by_id_or_alias_route(
let
join_room_response
=
join_room_by_id_helper
(
&
db
,
req
.
sender_user
.as_deref
(
),
Some
(
sender_user
),
&
room_id
,
&
servers
,
body
.third_party_signed
.as_ref
(),
...
...
This diff is collapsed.
Click to expand it.
src/client_server/push.rs
+
5
−
5
View file @
0183d003
...
...
@@ -105,15 +105,15 @@ pub async fn get_pushrule_route(
/// Creates a single specified push rule for this user.
#[cfg_attr(
feature
=
"conduit_bin"
,
put(
"/_matrix/client/r0/pushrules/<_>/<_>/<_>"
,
data
=
"<
req
>"
)
put(
"/_matrix/client/r0/pushrules/<_>/<_>/<_>"
,
data
=
"<
body
>"
)
)]
#[tracing::instrument(skip(db,
req
))]
#[tracing::instrument(skip(db,
body
))]
pub
async
fn
set_pushrule_route
(
db
:
DatabaseGuard
,
req
:
Ruma
<
set_pushrule
::
Request
<
'_
>>
,
body
:
Ruma
<
set_pushrule
::
Request
<
'_
>>
,
)
->
ConduitResult
<
set_pushrule
::
Response
>
{
let
sender_user
=
req
.sender_user
.as_ref
()
.expect
(
"user is authenticated"
);
let
body
=
req
.body
;
let
sender_user
=
body
.sender_user
.as_ref
()
.expect
(
"user is authenticated"
);
let
body
=
body
.body
;
if
body
.scope
!=
"global"
{
return
Err
(
Error
::
BadRequest
(
...
...
This diff is collapsed.
Click to expand it.
src/client_server/sync.rs
+
6
−
7
View file @
0183d003
...
...
@@ -54,17 +54,16 @@
/// `since` will be cached
#[cfg_attr(
feature
=
"conduit_bin"
,
get(
"/_matrix/client/r0/sync"
,
data
=
"<
req
>"
)
get(
"/_matrix/client/r0/sync"
,
data
=
"<
body
>"
)
)]
#[tracing::instrument(skip(db,
req
))]
#[tracing::instrument(skip(db,
body
))]
pub
async
fn
sync_events_route
(
db
:
DatabaseGuard
,
req
:
Ruma
<
sync_events
::
Request
<
'_
>>
,
body
:
Ruma
<
sync_events
::
Request
<
'_
>>
,
)
->
Result
<
RumaResponse
<
sync_events
::
Response
>
,
RumaResponse
<
UiaaResponse
>>
{
let
body
=
req
.body
;
let
sender_user
=
req
.sender_user
.expect
(
"user is authenticated"
);
let
sender_device
=
req
.sender_device
.expect
(
"user is authenticated"
);
let
sender_user
=
body
.sender_user
.expect
(
"user is authenticated"
);
let
sender_device
=
body
.sender_device
.expect
(
"user is authenticated"
);
let
body
=
body
.body
;
let
arc_db
=
Arc
::
new
(
db
);
...
...
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