Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxiuwen committed Oct 30, 2024
1 parent 09fcd21 commit d6ad03d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,23 @@ Use `ContactListener` to add the following callback events. When a user receives
```java
ChatClient.getInstance().contactManager().setContactListener(new ContactListener() {

//The contact request is approved
//Occurs when a contact request is approved.
@Override
public void onFriendRequestAccepted(String username) { }

//contact request is rejected
//Occurs when a contact request is rejected.
@Override
public void onFriendRequestDeclined(String username) { }

//Received contact invitation
//Occurs when a contact invitation is received.
@Override
public void onContactInvited(String username, String reason) { }

//Call back this method when deleted
//Occurs when a contact is deleted.
@Override
public void onContactDeleted(String username) { }

//Call back this method when a contact is added
//Occurs when a contact is added.
@Override
public void onContactAdded(String username) { }
});
Expand Down Expand Up @@ -118,7 +118,7 @@ Call `addUserToBlackList` to add the specified user to the block list.
You can add any other users to the block list, regardless of whether they are on the contact list or not. Contacts are still displayed on the contact list even if they are added to the block list. After adding users to the block list, you can still send messages to them, but will not receive messages from them as they cannot send messages or friend requests to you.

```java
// The effect of true and false is the same. I can send messages to users on the blacklist, but I cannot receive them when they send me messages.
// The effect of true and false is the same.
ChatClient.getInstance().contactManager().addUserToBlackList(username,true);
```

Expand All @@ -139,7 +139,7 @@ To get the block list, call `getBlackListFromServer` to retrieve a list of block
ChatClient.getInstance().contactManager().getBlackListFromServer();
```

After retrieving the block list from the server, you can also call `getBlackListUserNames` to retrieve the block list from the local database.
After retrieving the block list from the server, you can also call `getBlackListUsernames` to retrieve the block list from the local database.

```java
ChatClient.getInstance().contactManager().getBlackListUsernames();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Call `addContact` to add the specified user as a contact:
#### Listen for contact events
Use `ContactListener` to add the following callback events. When a user receives a contact invitation, you can accept or decline the invitation.
Use `AgoraChatContactManagerDelegate` to add the following callback events. When a user receives a contact invitation, you can accept or decline the invitation.
```objectivec
// Adds a contact manager delegate.
Expand Down

0 comments on commit d6ad03d

Please sign in to comment.