mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Fix missing handling of redacted beacon location data events
This commit is contained in:
parent
8fb402ab10
commit
1277376496
4 changed files with 14 additions and 3 deletions
|
@ -75,6 +75,7 @@ internal class RedactionEventProcessor @Inject constructor() : EventInsertLivePr
|
|||
EventType.ENCRYPTED,
|
||||
EventType.MESSAGE,
|
||||
in EventType.STATE_ROOM_BEACON_INFO,
|
||||
in EventType.BEACON_LOCATION_DATA,
|
||||
in EventType.POLL_START -> {
|
||||
Timber.d("REDACTION for message ${eventToPrune.eventId}")
|
||||
val unsignedData = EventMapper.map(eventToPrune).unsignedData
|
||||
|
|
|
@ -113,8 +113,14 @@ class TimelineItemFactory @Inject constructor(
|
|||
EventType.CALL_NEGOTIATE,
|
||||
EventType.REACTION,
|
||||
in EventType.POLL_RESPONSE,
|
||||
in EventType.POLL_END,
|
||||
in EventType.BEACON_LOCATION_DATA -> noticeItemFactory.create(params)
|
||||
in EventType.POLL_END -> noticeItemFactory.create(params)
|
||||
in EventType.BEACON_LOCATION_DATA -> {
|
||||
if (event.root.isRedacted()) {
|
||||
messageItemFactory.create(params)
|
||||
} else {
|
||||
noticeItemFactory.create(params)
|
||||
}
|
||||
}
|
||||
// Calls
|
||||
EventType.CALL_INVITE,
|
||||
EventType.CALL_HANGUP,
|
||||
|
|
|
@ -51,7 +51,7 @@ object TimelineDisplayableEvents {
|
|||
EventType.STATE_ROOM_JOIN_RULES,
|
||||
EventType.KEY_VERIFICATION_DONE,
|
||||
EventType.KEY_VERIFICATION_CANCEL,
|
||||
) + EventType.POLL_START + EventType.STATE_ROOM_BEACON_INFO
|
||||
) + EventType.POLL_START + EventType.STATE_ROOM_BEACON_INFO + EventType.BEACON_LOCATION_DATA
|
||||
}
|
||||
|
||||
fun TimelineEvent.isRoomConfiguration(roomCreatorUserId: String?): Boolean {
|
||||
|
|
|
@ -241,6 +241,10 @@ class TimelineEventVisibilityHelper @Inject constructor(
|
|||
} else root.eventId != rootThreadEventId
|
||||
}
|
||||
|
||||
if (root.getClearType() in EventType.BEACON_LOCATION_DATA) {
|
||||
return !root.isRedacted()
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue