mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
State events filtering + Bump sdk (#2404)
This commit is contained in:
parent
b338e98ed4
commit
a795e42961
@ -6732,7 +6732,7 @@
|
||||
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 1.1.35;
|
||||
version = 1.1.36;
|
||||
};
|
||||
};
|
||||
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
||||
|
@ -130,8 +130,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
||||
"state" : {
|
||||
"revision" : "b7ed8b30a1b648ebdf87bb14a11f071df4999e03",
|
||||
"version" : "1.1.35"
|
||||
"revision" : "e6aecad747a12e399ee718b5fb2ece45b7b6e23a",
|
||||
"version" : "1.1.36"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -586,14 +586,35 @@ class ClientProxy: ClientProxyProtocol {
|
||||
})
|
||||
}
|
||||
|
||||
private let eventFilters: TimelineEventTypeFilter = {
|
||||
let stateEventFilters: [FilterStateEventType] = [.roomAliases,
|
||||
.roomCanonicalAlias,
|
||||
.roomGuestAccess,
|
||||
.roomHistoryVisibility,
|
||||
.roomJoinRules,
|
||||
.roomPinnedEvents,
|
||||
.roomPowerLevels,
|
||||
.roomServerAcl,
|
||||
.roomTombstone,
|
||||
.spaceChild,
|
||||
.spaceParent,
|
||||
.policyRuleRoom,
|
||||
.policyRuleServer]
|
||||
|
||||
return .exclude(eventTypes: stateEventFilters.map { FilterTimelineEventType.state(eventType: $0) })
|
||||
}()
|
||||
|
||||
private func roomTupleForIdentifier(_ identifier: String) async -> (RoomListItem?, Room?) {
|
||||
do {
|
||||
let roomListItem = try roomListService?.room(roomId: identifier)
|
||||
let fullRoom = await roomListItem?.fullRoom()
|
||||
if roomListItem?.isTimelineInitialized() == false {
|
||||
try await roomListItem?.initTimeline(eventTypeFilter: eventFilters)
|
||||
}
|
||||
let fullRoom = try await roomListItem?.fullRoom()
|
||||
|
||||
return (roomListItem, fullRoom)
|
||||
} catch {
|
||||
MXLog.error("Failed retrieving room with identifier: \(identifier)")
|
||||
MXLog.error("Failed retrieving/initialising room with identifier: \(identifier)")
|
||||
return (nil, nil)
|
||||
}
|
||||
}
|
||||
|
1
changelog.d/2404.change
Normal file
1
changelog.d/2404.change
Normal file
@ -0,0 +1 @@
|
||||
The timeline will filter some unnecessary state events.
|
@ -47,7 +47,7 @@ packages:
|
||||
# Element/Matrix dependencies
|
||||
MatrixRustSDK:
|
||||
url: https://github.com/matrix-org/matrix-rust-components-swift
|
||||
exactVersion: 1.1.35
|
||||
exactVersion: 1.1.36
|
||||
# path: ../matrix-rust-sdk
|
||||
Compound:
|
||||
url: https://github.com/element-hq/compound-ios
|
||||
|
Loading…
x
Reference in New Issue
Block a user