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
parent 0e64cd56f7
commit 03d33731fd
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

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 {