Timo 2020-08-14 11:34:15 +02:00
parent 4be68eba76
commit 3ff17f69ad
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
4 changed files with 13 additions and 16 deletions

View File

@ -1,9 +1,12 @@
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};

View File

@ -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()) {

View File

@ -1,10 +1,10 @@
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;

View File

@ -1,12 +1,12 @@
#![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;