Skip to main content

Typing Status

Send Typing Status Message

  1. Send a typing status to the other party when the user is typing.
  2. Only supports one-to-one chat conversation type.

Method

Future<int> sendTypingStatus(RCIMIWConversationType type, String targetId, String? channelId, String currentType);

Parameter Description

Parameter NameParameter TypeDescription
typeRCIMIWConversationTypeConversation type
targetIdStringConversation ID
channelIdStringChannel ID, only supported for ultra groups. For other conversation types, pass null.
currentTypeStringCurrent status

Return Value

Return ValueDescription
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 NameParameter TypeDescription
typeRCIMIWConversationTypeConversation type
targetIdStringConversation ID
channelIdStringChannel ID, only supported for ultra groups. For other conversation types, pass null.
userTypingStatusList<RCIMIWTypingStatus>Collection of status changes

RCIMIWTypingStatus Introduction

Property NameTypeDescription
userIdStringThe user ID of the currently typing user
contentTypeStringThe message type name of the current input, which is the currentType passed by the sender when calling the send interface
sentTimeintTyping time

Code Example

engine?.onTypingStatusChanged = (RCIMIWConversationType? type, String? targetId, String? channelId, List<RCIMIWTypingStatus>? userTypingStatus) {
//...
};