Add fix for lost channel update bug

This commit is contained in:
Mikayla 2023-08-17 00:55:11 -07:00
parent 5bc481112e
commit 75679291a9
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -3650,7 +3650,11 @@ impl Database {
let ancestor_ids = self.get_channel_ancestors(id, tx).await?;
let user_ids = channel_member::Entity::find()
.distinct()
.filter(channel_member::Column::ChannelId.is_in(ancestor_ids.iter().copied()))
.filter(
channel_member::Column::ChannelId
.is_in(ancestor_ids.iter().copied())
.and(channel_member::Column::Accepted.eq(true)),
)
.select_only()
.column(channel_member::Column::UserId)
.into_values::<_, QueryUserIds>()