mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 03:06:14 +00:00
Do not render in-chat key verification requests in the timeline
A m.key.verification.request sent from a client that supports in-chat verification carries a plain text body for clients that do not. Element X has no msgtype of its own for it, so it fell through to OtherMessageType and the timeline printed that body, telling the user their client does not support in-chat key verification right after a verification they had just completed. Drop the event when building the timeline items, as Element X iOS does.
This commit is contained in:
+8
-1
@@ -128,4 +128,11 @@ sealed interface GalleryItemType {
|
||||
data class OtherMessageType(
|
||||
val msgType: String,
|
||||
val body: String,
|
||||
) : MessageType
|
||||
) : MessageType {
|
||||
/**
|
||||
* A `m.key.verification.request` carries a body meant for clients that cannot handle in-chat
|
||||
* verification, so it must not be rendered as a message.
|
||||
*/
|
||||
val isKeyVerificationRequest: Boolean
|
||||
get() = msgType == "m.key.verification.request"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user