Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
pjenvey committed Jul 22, 2024
1 parent fba5073 commit 438a35f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions autopush-common/src/db/bigtable/bigtable_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,10 @@ impl BigTableClientImpl {
});
};

cells.extend(channels_to_cells(Cow::Borrowed(&user._channels), expiry));
cells.extend(channels_to_cells(
Cow::Borrowed(&user.priv_channels),
expiry,
));

row.add_cells(ROUTER_FAMILY, cells);
row
Expand Down Expand Up @@ -986,7 +989,7 @@ impl DbClient for BigTableClientImpl {
}

// Read the channels last, after removal of all non channel cells
result._channels = channels_from_cells(&row.cells)?;
result.priv_channels = channels_from_cells(&row.cells)?;

Ok(Some(result))
}
Expand Down
4 changes: 2 additions & 2 deletions autopush-common/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub struct User {
/// flexible API that might benefit different, non Bigtable [DbClient]
/// backends that don't necessarily store the channel ids in the router
/// record).
_channels: HashSet<Uuid>,
priv_channels: HashSet<Uuid>,
}

impl Default for User {
Expand All @@ -191,7 +191,7 @@ impl Default for User {
record_version: Some(USER_RECORD_VERSION),
current_timestamp: None,
version: Some(Uuid::new_v4()),
_channels: HashSet::new(),
priv_channels: HashSet::new(),
}
}
}
Expand Down

0 comments on commit 438a35f

Please sign in to comment.