fmt
parent
4be68eba76
commit
3ff17f69ad
|
@ -1,9 +1,12 @@
|
||||||
use super::State;
|
use super::State;
|
||||||
use crate::{ConduitResult, Database, Error, Ruma, server_server};
|
use crate::{server_server, ConduitResult, Database, Error, Ruma};
|
||||||
use ruma::api::{federation, client::{
|
use ruma::api::{
|
||||||
error::ErrorKind,
|
client::{
|
||||||
r0::alias::{create_alias, delete_alias, get_alias},
|
error::ErrorKind,
|
||||||
}};
|
r0::alias::{create_alias, delete_alias, get_alias},
|
||||||
|
},
|
||||||
|
federation,
|
||||||
|
};
|
||||||
|
|
||||||
#[cfg(feature = "conduit_bin")]
|
#[cfg(feature = "conduit_bin")]
|
||||||
use rocket::{delete, get, put};
|
use rocket::{delete, get, put};
|
||||||
|
|
|
@ -81,10 +81,7 @@ pub async fn sync_events_route(
|
||||||
let mut send_member_count = false;
|
let mut send_member_count = false;
|
||||||
let mut joined_since_last_sync = false;
|
let mut joined_since_last_sync = false;
|
||||||
let mut send_notification_counts = false;
|
let mut send_notification_counts = false;
|
||||||
for pdu in db
|
for pdu in db.rooms.pdus_since(&sender_id, &room_id, since)? {
|
||||||
.rooms
|
|
||||||
.pdus_since(&sender_id, &room_id, since)?
|
|
||||||
{
|
|
||||||
let pdu = pdu?;
|
let pdu = pdu?;
|
||||||
send_notification_counts = true;
|
send_notification_counts = true;
|
||||||
if pdu.kind == EventType::RoomMember {
|
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) {
|
for room_id in db.rooms.rooms_invited(&sender_id) {
|
||||||
let room_id = room_id?;
|
let room_id = room_id?;
|
||||||
let mut invited_since_last_sync = false;
|
let mut invited_since_last_sync = false;
|
||||||
for pdu in db
|
for pdu in db.rooms.pdus_since(&sender_id, &room_id, since)? {
|
||||||
.rooms
|
|
||||||
.pdus_since(&sender_id, &room_id, since)?
|
|
||||||
{
|
|
||||||
let pdu = pdu?;
|
let pdu = pdu?;
|
||||||
if pdu.kind == EventType::RoomMember {
|
if pdu.kind == EventType::RoomMember {
|
||||||
if pdu.state_key == Some(sender_id.to_string()) {
|
if pdu.state_key == Some(sender_id.to_string()) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
pub mod client_server;
|
pub mod client_server;
|
||||||
pub mod server_server;
|
|
||||||
mod database;
|
mod database;
|
||||||
mod error;
|
mod error;
|
||||||
mod pdu;
|
mod pdu;
|
||||||
mod push_rules;
|
mod push_rules;
|
||||||
mod ruma_wrapper;
|
mod ruma_wrapper;
|
||||||
|
pub mod server_server;
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
pub use database::Database;
|
pub use database::Database;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#![warn(rust_2018_idioms)]
|
#![warn(rust_2018_idioms)]
|
||||||
|
|
||||||
pub mod server_server;
|
|
||||||
pub mod client_server;
|
pub mod client_server;
|
||||||
|
pub mod server_server;
|
||||||
|
|
||||||
mod push_rules;
|
|
||||||
mod database;
|
mod database;
|
||||||
mod error;
|
mod error;
|
||||||
mod pdu;
|
mod pdu;
|
||||||
|
mod push_rules;
|
||||||
mod ruma_wrapper;
|
mod ruma_wrapper;
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue