Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 13, 2024
1 parent 9a65363 commit 3abaa60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
8 changes: 3 additions & 5 deletions extensions/warp-ipfs/src/store/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3353,11 +3353,9 @@ async fn process_identity_events(

for id in list
.iter()
.filter_map(|c| {
match c.inner {
InnerDocument::Direct(_) => None,
InnerDocument::Group(ref document) => Some((c.id, document))
}
.filter_map(|c| match c.inner {
InnerDocument::Direct(_) => None,
InnerDocument::Group(ref document) => Some((c.id, document)),
})
.filter(|(_, c)| c.restrict.contains(&did))
.map(|(id, _)| id)
Expand Down
24 changes: 12 additions & 12 deletions extensions/warp-ipfs/src/store/message/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3167,8 +3167,8 @@ async fn message_event(
let creator = &document.creator;
if creator != sender
&& !document
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
{
return Err(Error::Unauthorized);
}
Expand Down Expand Up @@ -3209,8 +3209,8 @@ async fn message_event(
let creator = &document.creator;
if creator != sender
&& !document
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
{
return Err(Error::Unauthorized);
}
Expand All @@ -3234,8 +3234,8 @@ async fn message_event(
let creator = &document.creator;
if creator != sender
&& !document
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
{
return Err(Error::Unauthorized);
}
Expand Down Expand Up @@ -3273,8 +3273,8 @@ async fn message_event(
let creator = &document.creator;
if creator != sender
&& !document
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
{
return Err(Error::Unauthorized);
}
Expand All @@ -3295,8 +3295,8 @@ async fn message_event(
let creator = &document.creator;
if creator != sender
&& !document
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
{
return Err(Error::Unauthorized);
}
Expand All @@ -3315,8 +3315,8 @@ async fn message_event(
let creator = &document.creator;
if creator != sender
&& !document
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
.permissions
.has_permission(sender, GroupPermission::EditGroupInfo)
{
return Err(Error::Unauthorized);
}
Expand Down

0 comments on commit 3abaa60

Please sign in to comment.