add config option for allow_outgoing_read_receipts

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-10 15:22:50 -07:00 committed by June
parent 2b54c00f04
commit 6c9e95f7c9
4 changed files with 16 additions and 1 deletions

View file

@ -299,6 +299,8 @@ impl Service<'_> {
pub fn allow_incoming_read_receipts(&self) -> bool { self.config.allow_incoming_read_receipts }
pub fn allow_outgoing_read_receipts(&self) -> bool { self.config.allow_outgoing_read_receipts }
pub fn rocksdb_log_level(&self) -> &String { &self.config.rocksdb_log_level }
pub fn rocksdb_max_log_file_size(&self) -> usize { self.config.rocksdb_max_log_file_size }

View file

@ -450,7 +450,10 @@ impl Service {
.filter_map(Result::ok)
.filter(|user_id| user_id.server_name() == services().globals.server_name()),
);
if !select_edus_receipts(&room_id, since, &mut max_edu_count, &mut events)? {
if services().globals.allow_outgoing_read_receipts()
&& !select_edus_receipts(&room_id, since, &mut max_edu_count, &mut events)?
{
break;
}
}