Include DM users in payload; fix permission query. + cargo fmt

This commit is contained in:
Paul Makles
2021-02-09 16:41:08 +00:00
parent 4c99d079e0
commit b0d07ec58f
6 changed files with 37 additions and 80 deletions

View File

@@ -59,6 +59,8 @@ pub async fn generate_ready(mut user: User) -> Result<ClientboundNotification> {
if let Channel::Group { recipients, .. } = &channel {
user_ids.extend(recipients.iter().cloned());
} else if let Channel::DirectMessage { recipients, .. } = &channel {
user_ids.extend(recipients.iter().cloned());
}
channels.push(channel);
@@ -97,11 +99,7 @@ pub async fn generate_ready(mut user: User) -> Result<ClientboundNotification> {
.for_user_given()
.await?;
users.push(
other
.from(&user)
.with(permissions)
);
users.push(other.from(&user).with(permissions));
}
}
}