Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions crates/matrix-sdk-base/src/room/room_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use ruma::{
events::{
AnyStrippedStateEvent, AnySyncStateEvent, AnySyncTimelineEvent, StateEventType,
SyncStateEvent,
beacon_info::BeaconInfoEventContent,
call::member::{CallMemberEventContent, CallMemberStateKey, MembershipData},
direct::OwnedDirectUserIdentifier,
room::{
Expand Down Expand Up @@ -123,9 +122,6 @@ impl Room {
pub struct BaseRoomInfo {
/// The avatar URL of this room.
pub(crate) avatar: Option<MinimalStateEvent<RoomAvatarEventContent>>,
/// All shared live location beacons of this room.
#[serde(skip_serializing_if = "BTreeMap::is_empty", default)]
pub(crate) beacons: BTreeMap<OwnedUserId, MinimalStateEvent<BeaconInfoEventContent>>,
/// The canonical alias of this room.
pub(crate) canonical_alias: Option<MinimalStateEvent<RoomCanonicalAliasEventContent>>,
/// The `m.room.create` event content of this room.
Expand Down Expand Up @@ -192,9 +188,6 @@ impl BaseRoomInfo {
/// Returns true if the event modified the info, false otherwise.
pub fn handle_state_event(&mut self, ev: &AnySyncStateEvent) -> bool {
match ev {
AnySyncStateEvent::BeaconInfo(b) => {
self.beacons.insert(b.state_key().clone(), b.into());
}
// No redacted branch - enabling encryption cannot be undone.
AnySyncStateEvent::RoomEncryption(SyncStateEvent::Original(encryption)) => {
self.encryption = Some(encryption.content.clone());
Expand Down Expand Up @@ -404,7 +397,6 @@ impl Default for BaseRoomInfo {
fn default() -> Self {
Self {
avatar: None,
beacons: BTreeMap::new(),
canonical_alias: None,
create: None,
dm_targets: Default::default(),
Expand Down
6 changes: 1 addition & 5 deletions crates/matrix-sdk-base/src/store/migration_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

//! Data migration helpers for StateStore implementations.
use std::{
collections::{BTreeMap, HashSet},
sync::Arc,
};
use std::{collections::HashSet, sync::Arc};

use matrix_sdk_common::deserialized_responses::TimelineEvent;
use ruma::{
Expand Down Expand Up @@ -200,7 +197,6 @@ impl BaseRoomInfoV1 {

Box::new(BaseRoomInfo {
avatar,
beacons: BTreeMap::new(),
canonical_alias,
create,
dm_targets: converted_dm_targets,
Expand Down
Loading