fix to handle invitation panel when userId is the same

with same userId on both servers, the invitation panel could get shown also there were no invitations for the current account

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-03-26 15:32:18 +01:00 committed by backportbot[bot]
parent 8bd5a32f2d
commit 9cff4ac6aa

View file

@ -83,7 +83,11 @@ class ConversationsListViewModel @Inject constructor(
}
override fun onNext(invitationsModel: InvitationsModel) {
if (invitationsModel.user.userId?.equals(userManager.currentUser.blockingGet().userId) == true) {
val currentUser = userManager.currentUser.blockingGet()
if (invitationsModel.user.userId?.equals(currentUser.userId) == true &&
invitationsModel.user.baseUrl?.equals(currentUser.baseUrl) == true
) {
if (invitationsModel.invitations.isNotEmpty()) {
_getFederationInvitationsViewState.value = GetFederationInvitationsSuccessState(true)
} else {