ソースを参照

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>
Marcel Hibbe 1 年間 前
コミット
03d33731fd

+ 5 - 1
app/src/main/java/com/nextcloud/talk/conversationlist/viewmodels/ConversationsListViewModel.kt

@@ -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 {