Methods
acceptInvitation(username) → {Object}
- Source:
accept contact's invitation.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | 用户ID |
Returns:
同意好友申请结果
- Type
- Object
addToBlackList(username) → {Object}
- Source:
add contact to blacklist.
Note: both whether both side will be blocked, if true user also can not subscribe contact's presense. both = false is not work yet, current behaviour is both side conmunication will be blocded.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | 用户ID |
Returns:
添加黑名单结果
- Type
- Object
allContacts() → {Object}
- Source:
retrieve current user's friend list from server.
Returns:
好友列表
- Type
- Object
blacklist() → {Array}
- Source:
retrieve black list from memory.
Returns:
黑名单列表
- Type
- Array
declineInvitation(username) → {Object}
- Source:
decline contact's invitation.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | 好友ID |
Returns:
- Type
- Object
deleteContact(username, keepConversation) → {Object}
- Source:
invite contact to be friend, need contact accept.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | 用户ID |
keepConversation |
Bool | 删除后是否保留会话 |
Returns:
删除好友结果
- Type
- Object
getBlackListFromServer() → {Array}
- Source:
retrieve black list from server.
Returns:
黑名单列表
- Type
- Array
getContactsFromDB() → {Object}
- Source:
invite contact to be friend, need contact accept.
Returns:
好友列表
- Type
- Object
getContactsFromServer() → {Object}
- Source:
retrieve current user's friend list from server.
Returns:
好友列表
- Type
- Object
getSelfIdsOnOtherPlatform() → {Array}
- Source:
get self id list on other platforms.
Returns:
String
- Type
- Array
inviteContact(username, message) → {Object}
- Source:
invite contact to be friend, need contact accept.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | 用户ID |
message |
String | 邀请信息 |
Returns:
邀请信息发送结果
- Type
- Object
registerContactListener(listener) → {void}
- Source:
register contact status change listener.
Parameters:
Name | Type | Description |
---|---|---|
listener |
EMContactListener | 好友管理回调监听对象 |
Returns:
- Type
- void
removeContactListener(listener) → {void}
- Source:
remove registration of contact status change listener.
Parameters:
Name | Type | Description |
---|---|---|
listener |
EMContactListener | 好友管理回调监听对象 |
Returns:
- Type
- void
removeFromBlackList(username) → {Object}
- Source:
remove contact from black list.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | 用户ID |
Returns:
- Type
- Object
saveBlackList(blacklist) → {Object}
- Source:
save black list.
Parameters:
Name | Type | Description |
---|---|---|
blacklist |
Array | String array 黑名单 |
Returns:
修改黑名单结果
- Type
- Object