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
3ff17f69
Unverified
Commit
3ff17f69
authored
4 years ago
by
Timo
Browse files
Options
Downloads
Patches
Plain Diff
fmt
parent
4be68eba
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/client_server/alias.rs
+8
-5
8 additions, 5 deletions
src/client_server/alias.rs
src/client_server/sync.rs
+2
-8
2 additions, 8 deletions
src/client_server/sync.rs
src/lib.rs
+1
-1
1 addition, 1 deletion
src/lib.rs
src/main.rs
+2
-2
2 additions, 2 deletions
src/main.rs
with
13 additions
and
16 deletions
src/client_server/alias.rs
+
8
−
5
View file @
3ff17f69
use
super
::
State
;
use
crate
::{
ConduitResult
,
Database
,
Error
,
Ruma
,
server_server
};
use
ruma
::
api
::{
federation
,
client
::{
error
::
ErrorKind
,
r0
::
alias
::{
create_alias
,
delete_alias
,
get_alias
},
}};
use
crate
::{
server_server
,
ConduitResult
,
Database
,
Error
,
Ruma
};
use
ruma
::
api
::{
client
::{
error
::
ErrorKind
,
r0
::
alias
::{
create_alias
,
delete_alias
,
get_alias
},
},
federation
,
};
#[cfg(feature
=
"conduit_bin"
)]
use
rocket
::{
delete
,
get
,
put
};
...
...
This diff is collapsed.
Click to expand it.
src/client_server/sync.rs
+
2
−
8
View file @
3ff17f69
...
...
@@ -81,10 +81,7 @@ pub async fn sync_events_route(
let
mut
send_member_count
=
false
;
let
mut
joined_since_last_sync
=
false
;
let
mut
send_notification_counts
=
false
;
for
pdu
in
db
.rooms
.pdus_since
(
&
sender_id
,
&
room_id
,
since
)
?
{
for
pdu
in
db
.rooms
.pdus_since
(
&
sender_id
,
&
room_id
,
since
)
?
{
let
pdu
=
pdu
?
;
send_notification_counts
=
true
;
if
pdu
.kind
==
EventType
::
RoomMember
{
...
...
@@ -392,10 +389,7 @@ pub async fn sync_events_route(
for
room_id
in
db
.rooms
.rooms_invited
(
&
sender_id
)
{
let
room_id
=
room_id
?
;
let
mut
invited_since_last_sync
=
false
;
for
pdu
in
db
.rooms
.pdus_since
(
&
sender_id
,
&
room_id
,
since
)
?
{
for
pdu
in
db
.rooms
.pdus_since
(
&
sender_id
,
&
room_id
,
since
)
?
{
let
pdu
=
pdu
?
;
if
pdu
.kind
==
EventType
::
RoomMember
{
if
pdu
.state_key
==
Some
(
sender_id
.to_string
())
{
...
...
This diff is collapsed.
Click to expand it.
src/lib.rs
+
1
−
1
View file @
3ff17f69
pub
mod
client_server
;
pub
mod
server_server
;
mod
database
;
mod
error
;
mod
pdu
;
mod
push_rules
;
mod
ruma_wrapper
;
pub
mod
server_server
;
mod
utils
;
pub
use
database
::
Database
;
...
...
This diff is collapsed.
Click to expand it.
src/main.rs
+
2
−
2
View file @
3ff17f69
#![warn(rust_2018_idioms)]
pub
mod
server_server
;
pub
mod
client_server
;
pub
mod
server_server
;
mod
push_rules
;
mod
database
;
mod
error
;
mod
pdu
;
mod
push_rules
;
mod
ruma_wrapper
;
mod
utils
;
...
...
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