Closed marshad13 closed 7 years ago
Hi @marshad13, please check documentation "Contact list". Are you using Add, Confirm
functionality?
I can give you example:
To add users to the contact list just use the method below:
[[QBChat instance] addUserToContactListRequest:24123 completion:^(NSError * _Nullable error) {
}];
To confirm the request:
[[QBChat instance] confirmAddContactRequest:5645 completion:^(NSError * _Nullable error) {
}];
@marshad13 Any updates?
I am using mentioned methods to 'add' and 'confirm', but the question is same how to find if anyone one contact is go offline or come online?
Hi @marshad13, [QBChat instance].contactList.contacts
contains QBContactListItem
items
@interface QBContactListItem : NSObject
...
//User status (online/offline).
@property (nonatomic, assign, getter=isOnline) BOOL online;
...
You can also track contact list updates in real time by using delegate:
#pragma mark -
#pragma mark QBChatDelegate
- (void)chatContactListDidChange:(QBContactList *)contactList {
NSLog(@"Contact list did change : %@", contactList);
}
So this dialog will automatically be called when someone (from my contact list) came in or go out of app right?
hi @marshad13, Sorry for the delay in our reply, yes you're right
Hi @marshad13, any updates?
The issue is closed due to no response.
In my app i wanted to know, during my chat if one of my linked users go offline or came online, is there any delegate method in QBChat? I have checked this QBChat delegate but didn't get anything,
- (void)chatDidReceiveContactItemActivity:(NSUInteger)userID isOnline:(BOOL)isOnline status:(nullable NSString *)status
It might be because my contact list is empty, By the way i find my friends using '[QBRequest usersWithIDs:]'
Here is version info,
"QB-OS" = "iOS 10.1.1" "QB-SDK" = "iOS 2.9" "QuickBlox-REST-API-Version" = "0.1.1" "QuickbloxWebRTC version" = "2.3"