diff --git a/backend/canisters/community/CHANGELOG.md b/backend/canisters/community/CHANGELOG.md index 93d8fff0e1..faedeb1d4e 100644 --- a/backend/canisters/community/CHANGELOG.md +++ b/backend/canisters/community/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.1377](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1377-community)] - 2024-10-10 + ### Added - Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401)) diff --git a/backend/canisters/community/impl/src/lifecycle/post_upgrade.rs b/backend/canisters/community/impl/src/lifecycle/post_upgrade.rs index cb126327f5..a7912e2b03 100644 --- a/backend/canisters/community/impl/src/lifecycle/post_upgrade.rs +++ b/backend/canisters/community/impl/src/lifecycle/post_upgrade.rs @@ -1,7 +1,7 @@ use crate::jobs::import_groups::finalize_group_import; use crate::lifecycle::{init_env, init_state}; use crate::memory::get_upgrades_memory; -use crate::{mutate_state, read_state, Data}; +use crate::{read_state, Data}; use canister_logger::LogEntry; use canister_tracing_macros::trace; use community_canister::post_upgrade::Args; @@ -9,7 +9,6 @@ use ic_cdk::post_upgrade; use instruction_counts_log::InstructionCountFunctionId; use stable_memory::get_reader; use tracing::info; -use types::CanisterId; #[post_upgrade] #[trace] @@ -32,15 +31,6 @@ fn post_upgrade(args: Args) { info!(version = %args.wasm_version, "Post-upgrade complete"); - let windoge_community = CanisterId::from_text("ow6el-gyaaa-aaaar-av5na-cai").unwrap(); - mutate_state(|state| { - if state.env.canister_id() == windoge_community { - for channel in state.data.channels.iter_mut() { - channel.chat.events.populate_search_index(); - } - } - }); - read_state(|state| { let now = state.env.now(); state diff --git a/backend/libraries/chat_events/src/chat_events.rs b/backend/libraries/chat_events/src/chat_events.rs index 08b51f0529..6a9cca8117 100644 --- a/backend/libraries/chat_events/src/chat_events.rs +++ b/backend/libraries/chat_events/src/chat_events.rs @@ -44,22 +44,10 @@ pub struct ChatEvents { last_updated_timestamps: LastUpdatedTimestamps, video_call_in_progress: Timestamped>, anonymized_id: String, - #[serde(default)] search_index: SearchIndex, } impl ChatEvents { - // TODO remove this - pub fn populate_search_index(&mut self) { - for event in self.main.iter(None, true, EventIndex::default()) { - if let EventOrExpiredRangeInternal::Event(e) = event { - if let ChatEventInternal::Message(m) = &e.event { - self.search_index.push(m.message_index, m.sender, Document::from(&m.content)); - } - } - } - } - pub fn new_direct_chat( them: UserId, events_ttl: Option,