From ec30e7b85c766e7df8639fea30f8f337a7871ccc Mon Sep 17 00:00:00 2001 From: Michael Goldenberg Date: Thu, 12 Jun 2025 13:58:36 -0400 Subject: [PATCH] docs(indexeddb): add license to event_cache_store::types file Signed-off-by: Michael Goldenberg --- .../src/event_cache_store/serializer/types.rs | 6 ++++++ .../src/event_cache_store/types.rs | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/types.rs b/crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/types.rs index 2b3f9ada0..2669c4ec3 100644 --- a/crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/types.rs +++ b/crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/types.rs @@ -173,6 +173,12 @@ pub enum IndexedNextChunkIdKey { Some(IndexedChunkIdKey), } +impl IndexedNextChunkIdKey { + pub fn none(room_id: IndexedRoomId) -> Self { + Self::None((room_id,)) + } +} + impl IndexedKey for IndexedNextChunkIdKey { type KeyComponents = Option; diff --git a/crates/matrix-sdk-indexeddb/src/event_cache_store/types.rs b/crates/matrix-sdk-indexeddb/src/event_cache_store/types.rs index 95a5726dd..d2f90f76c 100644 --- a/crates/matrix-sdk-indexeddb/src/event_cache_store/types.rs +++ b/crates/matrix-sdk-indexeddb/src/event_cache_store/types.rs @@ -1,3 +1,17 @@ +// Copyright 2025 The Matrix.org Foundation C.I.C. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License + use matrix_sdk_base::{ deserialized_responses::TimelineEvent, event_cache::store::extract_event_relation, linked_chunk::ChunkIdentifier,