Start work on notifications from client, cargo fmt

This commit is contained in:
Paul Makles
2020-12-30 11:36:32 +00:00
parent af56f5e2d8
commit f39bc07bb9
34 changed files with 341 additions and 264 deletions

View File

@@ -7,7 +7,7 @@ use std::ops;
pub enum UserPermission {
Access = 1,
SendMessage = 2,
Invite = 4
Invite = 4,
}
bitfield! {
@@ -40,9 +40,7 @@ pub fn get_relationship(a: &User, b: &Ref) -> RelationshipStatus {
}
if let Some(relations) = &a.relations {
if let Some(relationship) = relations
.iter()
.find(|x| x.id == b.id) {
if let Some(relationship) = relations.iter().find(|x| x.id == b.id) {
return relationship.status.clone();
}
}