chat-sdk / chat-sdk-ios

Chat SDK iOS - Open Source Mobile Messenger
http://sdk.chat
Other
913 stars 276 forks source link

Reply chat not working in Chat push notification #462

Open vipul8989 opened 3 years ago

vipul8989 commented 3 years ago
  1. Is the bug present in the demo Chat SDK project? Yes

  2. What modifications have you made to the Chat SDK? To Implement reply to notifications

  3. iOS Version? Device or simulator? 13.0

  4. Steps taken to reproduce the problem: Give chat reply from notification control, It's not working. send message to thread function not execute properly.

  5. Expected result: I want to reply any chat notification from notification control of device.

  6. Actual result: I want to reply any chat notification from notification control of device.

  7. Comments: Anyone can help me to implement this feature?

ChatSDK class code: (BLocalNotificationDelegate.m file code)

in didReceiveNotificationResponse method..

                **[BChatSDK.core sendMessageWithText:text withThreadEntityID:threadEntityID].then(^id(id result) {
                    [[UIApplication sharedApplication] endBackgroundTask:taskIndentifier];
                    return Nil;
                }, ^id(NSError * error) {
                    [[UIApplication sharedApplication] endBackgroundTask:taskIndentifier];
                    return Nil;
                });**

above code is implemented already in this SDK, but it's not execute/working properly. I think it is related to UI API task so it's not finishing in background thread.