Typing Status
Send Typing Status Message
- Send a typing status to the other party when the user is typing.
- Only supports one-to-one chat conversation type.
Method
Future<int> sendTypingStatus(RCIMIWConversationType type, String targetId, String? channelId, String currentType);
Parameter Description
Parameter Name | Parameter Type | Description |
---|---|---|
type | RCIMIWConversationType | Conversation type |
targetId | String | Conversation ID |
channelId | String | Channel ID, only supported for ultra groups. For other conversation types, pass null. |
currentType | String | Current status |
Return Value
Return Value | Description |
---|---|
Future<int> | The status code of the current interface operation. 0 indicates a successful call. The specific result needs to be implemented in the interface callback. Non-zero indicates that the current interface call operation failed, and the interface callback will not be triggered. For detailed errors, refer to the error codes. |
Code Example
int? ret = await engine?.sendTypingStatus(type, targetId, channelId, currentType);
Set Typing Status Listener
Trigger: When the typing users in the current conversation change.
Method
Function(RCIMIWConversationType? type, String? targetId, String? channelId, List<RCIMIWTypingStatus>? userTypingStatus)? onTypingStatusChanged;
Parameter Description
Parameter Name | Parameter Type | Description |
---|---|---|
type | RCIMIWConversationType | Conversation type |
targetId | String | Conversation ID |
channelId | String | Channel ID, only supported for ultra groups. For other conversation types, pass null. |
userTypingStatus | List<RCIMIWTypingStatus> | Collection of status changes |
RCIMIWTypingStatus Introduction
Property Name | Type | Description |
---|---|---|
userId | String | The user ID of the currently typing user |
contentType | String | The message type name of the current input, which is the currentType passed by the sender when calling the send interface |
sentTime | int | Typing time |
Code Example
engine?.onTypingStatusChanged = (RCIMIWConversationType? type, String? targetId, String? channelId, List<RCIMIWTypingStatus>? userTypingStatus) {
//...
};