Skip to content

Commit

Permalink
Post release (#6557)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Oct 11, 2024
1 parent 099e515 commit 8bfaa75
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 29 deletions.
2 changes: 2 additions & 0 deletions backend/canisters/community/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1378](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1378-community)] - 2024-10-10

### Fixed

- Fix video calls in communities ([#6554](https://github.com/open-chat-labs/open-chat/pull/6554))
Expand Down
2 changes: 2 additions & 0 deletions backend/canisters/local_user_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1379](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1379-local_user_index)] - 2024-10-10

### Added

- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))
Expand Down
29 changes: 1 addition & 28 deletions backend/canisters/local_user_index/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use model::global_user_map::GlobalUserMap;
use model::local_user_map::LocalUserMap;
use p256_key_pair::P256KeyPair;
use proof_of_unique_personhood::verify_proof_of_unique_personhood;
use serde::{Deserialize, Deserializer, Serialize};
use serde::{Deserialize, Serialize};
use std::cell::RefCell;
use std::collections::{HashMap, VecDeque};
use std::time::Duration;
Expand All @@ -26,7 +26,6 @@ use user_canister::Event as UserEvent;
use user_index_canister::Event as UserIndexEvent;
use utils::canister;
use utils::canister::{CanistersRequiringUpgrade, FailedUpgradeCount};
use utils::canister_event_sync_queue::CanisterEventSyncQueue;
use utils::consts::CYCLES_REQUIRED_FOR_UPGRADE;
use utils::env::Environment;
use utils::time::MINUTE_IN_MS;
Expand Down Expand Up @@ -279,9 +278,7 @@ struct Data {
pub canisters_requiring_upgrade: CanistersRequiringUpgrade,
pub canister_pool: canister::Pool,
pub total_cycles_spent_on_canisters: Cycles,
#[serde(deserialize_with = "deserialize_user_event_sync_queue")]
pub user_event_sync_queue: GroupedTimerJobQueue<UserEventBatch>,
#[serde(deserialize_with = "deserialize_user_index_event_sync_queue")]
pub user_index_event_sync_queue: GroupedTimerJobQueue<UserIndexEventBatch>,
pub test_mode: bool,
pub max_concurrent_canister_upgrades: u32,
Expand All @@ -299,30 +296,6 @@ struct Data {
pub events_for_remote_users: Vec<(UserId, UserEvent)>,
}

fn deserialize_user_event_sync_queue<'de, D: Deserializer<'de>>(
d: D,
) -> Result<GroupedTimerJobQueue<UserEventBatch>, D::Error> {
let previous: CanisterEventSyncQueue<UserEvent> = CanisterEventSyncQueue::deserialize(d)?;

let new = GroupedTimerJobQueue::new(10, false);
for (canister_id, events) in previous.take_all() {
new.push_many(canister_id.into(), events);
}
Ok(new)
}

fn deserialize_user_index_event_sync_queue<'de, D: Deserializer<'de>>(
d: D,
) -> Result<GroupedTimerJobQueue<UserIndexEventBatch>, D::Error> {
let previous: CanisterEventSyncQueue<UserIndexEvent> = CanisterEventSyncQueue::deserialize(d)?;

let new = GroupedTimerJobQueue::new(1, true);
for (canister_id, events) in previous.take_all() {
new.push_many(canister_id, events);
}
Ok(new)
}

#[derive(Serialize, Deserialize)]
pub struct FailedMessageUsers {
pub sender: UserId,
Expand Down
2 changes: 1 addition & 1 deletion backend/libraries/types/src/gated_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct AccessGateConfig {
}

#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq)]
// #[serde(from = "AccessGate")]
#[serde(from = "AccessGate")]
pub struct AccessGateConfigInternal {
pub gate: AccessGate,
pub expiry: Option<Milliseconds>,
Expand Down

0 comments on commit 8bfaa75

Please sign in to comment.