Search code examples
iosquickblox

QuickBlox iOS contact list : accept/reject subscription state


With reference to this link- http://quickblox.com/developers/SimpleSample-chat_users-ios#Contact_list

I haven't found the subscriptionState property of QBContactListItem. If am adding a contact using

[[QBChat instance] addUserToContactListRequest:0123456]; 

I would like to follow the subscription state as QBPresenseSubscriptionStateBoth. I haven't found out a way to get these and implement it in my code. Please provide some light into this.

Thanks,


Solution

  • What exactly you would like to implement?

    Use this method to add contact request

    [[QBChat instance] addUserToContactListRequest:0123456]; 
    

    Use this code to accept this requests

    - (void)chatDidReceiveContactAddRequestFromUser:(NSUInteger)userID{
        [[QBChat instance] confirmAddContactRequest:userID];
    }
    

    Then, both users can get each other from contact list by

    [QBChat instance].contactList.contacts