Render kick and ban reason in the timeline when available (#4642)
* Map the reason to RoomMembershipContent * Create function to create RoomMembershipContent. * Render reason for kick and ban state event.
This commit is contained in:
parent
b4b93a64d6
commit
e502eb1971
10 changed files with 164 additions and 78 deletions
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.matrix.test.timeline.item.event
|
||||
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.timeline.item.event.MembershipChange
|
||||
import io.element.android.libraries.matrix.api.timeline.item.event.RoomMembershipContent
|
||||
import io.element.android.libraries.matrix.test.A_USER_ID
|
||||
|
||||
fun aRoomMembershipContent(
|
||||
userId: UserId = A_USER_ID,
|
||||
userDisplayName: String? = null,
|
||||
change: MembershipChange? = null,
|
||||
reason: String? = null,
|
||||
) = RoomMembershipContent(
|
||||
userId = userId,
|
||||
userDisplayName = userDisplayName,
|
||||
change = change,
|
||||
reason = reason,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue