Remove forward action for polls (#1973)

This commit is contained in:
Alfonso Grillo 2023-10-27 22:35:18 +02:00 committed by GitHub
parent a837ce5cff
commit 5439b650a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -598,7 +598,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
}
}
if item.isRemoteMessage {
if item.isForwardable {
actions.append(.forward(itemID: itemID))
}

View File

@ -35,6 +35,10 @@ extension EventBasedTimelineItemProtocol {
"\(String(describing: Self.self)): id: \(id), timestamp: \(timestamp), isOutgoing: \(isOutgoing), properties: \(properties)"
}
var isForwardable: Bool {
isRemoteMessage && !(self is PollRoomTimelineItem)
}
var isRemoteMessage: Bool {
id.eventID != nil
}