This commit is contained in:
Benoit Marty 2019-12-04 19:18:35 +01:00
parent 415511f3e0
commit 03d51281a2

View file

@ -192,15 +192,14 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
} ?: sp.getString(R.string.notice_room_invite_no_invitee, senderDisplayName) } ?: sp.getString(R.string.notice_room_invite_no_invitee, senderDisplayName)
else -> else ->
eventContent.safeReason?.let { reason -> eventContent.safeReason?.let { reason ->
sp.getString(R.string.notice_room_invite, senderDisplayName, targetDisplayName, reason) sp.getString(R.string.notice_room_invite_with_reason, senderDisplayName, targetDisplayName, reason)
} ?: sp.getString(R.string.notice_room_invite, senderDisplayName, targetDisplayName) } ?: sp.getString(R.string.notice_room_invite, senderDisplayName, targetDisplayName)
} }
} }
Membership.JOIN -> Membership.JOIN ->
eventContent.safeReason?.let { reason -> eventContent.safeReason?.let { reason ->
sp.getString(R.string.notice_room_join_with_reason, senderDisplayName, reason) sp.getString(R.string.notice_room_join_with_reason, senderDisplayName, reason)
} } ?: sp.getString(R.string.notice_room_join, senderDisplayName)
?: sp.getString(R.string.notice_room_join, senderDisplayName)
Membership.LEAVE -> Membership.LEAVE ->
// 2 cases here: this member may have left voluntarily or they may have been "left" by someone else ie. kicked // 2 cases here: this member may have left voluntarily or they may have been "left" by someone else ie. kicked
if (event.senderId == event.stateKey) { if (event.senderId == event.stateKey) {