Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Chat Thread List Not getting loaded properly after login #474

Open
chintanMaisuriya opened this issue May 6, 2021 · 0 comments
Open

Chat Thread List Not getting loaded properly after login #474

chintanMaisuriya opened this issue May 6, 2021 · 0 comments

Comments

@chintanMaisuriya
Copy link

chintanMaisuriya commented May 6, 2021

Hello,
I have noticed this behavior that after login the app would fetch all the chat threads with the setting "config.showEmptyChats = true". Now I don't want to show empty threads to the users, so, if I set that setting to "config.showEmptyChats = false" and do login into the app then the thread list will be empty. The list will only visible if I change the tab and back to the threads tab.
Can you guys please look into this

  1. Is the bug present in the demo Chat SDK project?
  • Yes
  1. What modifications have you made to the Chat SDK?
  • No
  1. iOS Version? Device or simulator?
  • iOS 14.4, Simulator - iPhone 12
  1. Steps taken to reproduce the problem:
  • Set "config.showEmptyChats = false" in the BConfiguration
  • Logout from the app and delete the app
  • Install the app again
  • Login with the same user
  • Oops! List not visible unless and until I changed the tab and back to the same tab
  1. Expected result:
  • List should be visible without empty threads directly when the user visits the view controller initially. A user don't have to visit the view controller again to get the threads list.

I'm getting this result with the security rules as follows:

{
"rules": {
".read": true,
".write": true
}
}

If I set the securoty rules from the "https://github.com/chat-sdk/chat-sdk-firebase/blob/master/database.rules.json" link then I got the log printed as follows:

ReconnectingView: bConnectionStatus(rawValue: 0) last nil
2021-05-06 10:02:49.055515+0530 ChatSDKSwift[13738:101772] Connected
2021-05-06 10:02:49.344162+0530 ChatSDKSwift[13738:102684] 7.10.0 - [Firebase/Database][I-RDB038012] Listener at /Development/V1/users/XUBKlDQbgvN957cLugrYMBkSbou2/threads failed: permission_denied
2021-05-06 10:02:49.344528+0530 ChatSDKSwift[13738:102684] 7.10.0 - [Firebase/Database][I-RDB038012] Listener at /Development/V1/public-threads failed: permission_denied
2021-05-06 10:02:49.348766+0530 ChatSDKSwift[13738:102684] 7.10.0 - [Firebase/Database][I-RDB038012] Listener at /Development/V1/users/XUBKlDQbgvN957cLugrYMBkSbou2/contacts failed: permission_denied
2021-05-06 10:02:49.349085+0530 ChatSDKSwift[13738:102684] 7.10.0 - [Firebase/Database][I-RDB038008] onDisconnectSetValue: or onDisconnectRemoveValue: at /Development/V1/users/XUBKlDQbgvN957cLugrYMBkSbou2/online failed: permission_denied
2021-05-06 10:02:49.349319+0530 ChatSDKSwift[13738:102684] 7.10.0 - [Firebase/Database][I-RDB038012] Listener at /Development/V1/flagged/messages failed: permission_denied
2021-05-06 10:02:49.349689+0530 ChatSDKSwift[13738:102684] 7.10.0 - [Firebase/Database][I-RDB038012] setValue: or removeValue: at /Development/V1/users/XUBKlDQbgvN957cLugrYMBkSbou2/online failed: permission_denied


Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant