Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

iOS "startChat" function is not working for me #46

Closed
JeetSA opened this issue Jul 27, 2023 · 2 comments
Closed

iOS "startChat" function is not working for me #46

JeetSA opened this issue Jul 27, 2023 · 2 comments

Comments

@JeetSA
Copy link

JeetSA commented Jul 27, 2023

In iOS device when I open chat from "startChat" function with predefined message, it is working fine when I do it for the first time.

After that when I click on close button and close the view and open is again with the "startChat" function, nothing is happening. The logs are also not printing any error message it just simply doesn't work.

This scenario is working fine in android build, it is just not working on iOS device.

Our main agenda here is to show chat support from our app's "Contact us" button as we already have another floating button in place in our app.

Can someone please help me here as we need to go live with this feature urgently?!

@venkatesh-ramesh-12517
Copy link
Collaborator

Hi @JeetSA

Thank you for reaching out to us regarding the issue. We apologize for the inconvenience caused.

We have looked into this issue. It seems the behavior you encountered is related to parallel conversations. Our current iOS implementation is handled in such a way that during an ongoing chat and when you're trying to use the "startChat" function again (in the "Contact us" button), it would be unresponsive.

To resolve this, we have a workaround for this issue. Using the below code snippet, you can check the existing chat status before deciding to show the chat or start a new one.

The snippet will work as follows:

ZohoSalesIQ.getChatsWithFilter(SIQChatStatus.open).then((chatList){
    if (chat?.length != null && chat.length > 0) {
         // There is an open chat, show the chat view
        ZohoSalesIQ.show();
    } else {
        // No open chat, start a new chat with a predefined question
        ZohoSalesIQ.startChat("Hello");
    }
}).catchError((error){
    
});

This way, if there is an open chat (indicated by a non-zero chat count), the chat view will be displayed. Otherwise, if there are no open chats, a new chat will be initiated.

I hope this works. Also, we will fix this problem with the upcoming iOS build similar to Android.

For Reference:

  1. .getChatsWithFilter()
  2. .show()
  3. .startChat()

If you have any further questions or concerns, please feel free to contact us at support@zohosalesiq.com

Best regards,
Venkatesh,
Zoho SalesIQ

@venkatesh-ramesh-12517
Copy link
Collaborator

Hello @JeetSA

Greetings from Zoho SalesIQ. We've successfully resolved your issue regarding using the startChat() method during an ongoing chat session when parallel conversation is disabled. With our latest update (Version 3.0.0), the system will open the existing active chat during this instance.

If you have any additional questions feel free at write us at support@zohosalesiq.com

Best regards,
Venkatesh,
Zoho SalesIQ

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

No branches or pull requests

2 participants