UserModule

public final class UserModule

User feature module.

Provides user-related features including subscription event management, online status queries, user profile management, friend management, and friend applications.

This is a singleton class. Obtain the instance via ai.nexconn.chat.NCEngine.userModule.

Functions

Link copied to clipboard
public final Unit acceptFriendApplication(String userId, ErrorHandler handler)

Accepts a friend request.

Link copied to clipboard
public final Unit addFriend(AddFriendParams params, OperationHandler<Integer> handler)

Sends a friend request.

Link copied to clipboard
public final Unit addToBlocklist(String userId, ErrorHandler handler)

Adds a user to the block list.

Link copied to clipboard
public final Unit checkBlocked(String userId, OperationHandler<Boolean> handler)

Checks whether a specified user is in the block list.

Link copied to clipboard
public final Unit checkFriends(List<String> userIds, OperationHandler<List<FriendRelation>> handler)

Checks friend relationships with specified users.

Link copied to clipboard

Creates a paginated query object for friend applications.

Link copied to clipboard

Creates a paginated query object for subscription events.

Link copied to clipboard
public final Unit deleteFriends(List<String> userIds, ErrorHandler handler)

Deletes friends in batch.

Link copied to clipboard
public final Unit getBlocklist(OperationHandler<List<String>> handler)

Gets the current user's block list.

Link copied to clipboard

Gets the current friend request permission setting.

Link copied to clipboard
public final Unit getFriends(OperationHandler<List<FriendDetail>> handler)

Gets the friend list.

Link copied to clipboard
public final Unit getFriendsInfo(List<String> userIds, OperationHandler<List<FriendDetail>> handler)

Batch retrieves friend info.

Link copied to clipboard

Gets the current user's profile.

Link copied to clipboard

Gets the current user's profile visibility setting.

Link copied to clipboard

Queries current subscription event status.

Link copied to clipboard
public final Unit getSubscribeUsersOnlineStatus(List<String> userIds, OperationHandler<List<UserOnlineStatus>> handler)

Batch queries the online status of subscribed users.

Link copied to clipboard
public final Unit getUserProfiles(List<String> userIds, OperationHandler<List<UserProfile>> handler)

Batch retrieves user profiles.

Link copied to clipboard
public final Unit refuseFriendApplication(String userId, ErrorHandler handler)

Rejects a friend request.

Link copied to clipboard
public final Unit removeFromBlocklist(String userId, ErrorHandler handler)

Removes a user from the block list.

Link copied to clipboard
public final Unit searchFriendsInfo(String name, OperationHandler<List<FriendDetail>> handler)

Searches for friends by name.

Link copied to clipboard
public final Unit setFriendAddPermission(FriendAddPermission permission, ErrorHandler handler)

Sets the friend request permission.

Link copied to clipboard
public final Unit setFriendInfo(SetFriendInfoParams params, ErrorDetailHandler<List<String>> handler)

Sets friend info (e.g., remark name, extended profile).

Link copied to clipboard
public final Unit subscribeEvent(SubscribeEventParams params, ErrorDetailHandler<List<String>> handler)

Subscribes to user status events.

Link copied to clipboard
public final Unit unsubscribeEvent(UnsubscribeEventParams params, ErrorDetailHandler<List<String>> handler)

Unsubscribes from user status events.

Link copied to clipboard
public final Unit updateMyUserProfile(UserProfile profile, ErrorDetailHandler<List<String>> handler)

Updates the current user's profile.

Link copied to clipboard

Updates the current user's profile visibility.