Class
ZIM
Details
ZIM SDK main class.
Declared in ZIM.cs
Methods
Create
public static ZIM | null Create(ZIMAppConfig appConfig)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| appConfig | ZIMAppConfig | AppID and appSign issued by ZEGO for developers, Please apply at the ZEGO console. |
- When to call: Before calling other member functions, you must call this API to create a ZIM example.
Usage restrictions: Currently only one instance is supported, repeated calls will return [null].
Precautions:
-
Currently, the [Create] function can only create one instance at most. If it is called multiple times, only the first one will return a valid instance, and the rest will be [null]. The developer should save the ZIM instance by himself, and ensure that the life cycle of the instance is available in the process of using the ZIM business function; or after calling [Create], he can use [GetInstance] to obtain its singleton object and call other member functions.
-
If you use this function to create an instance, you must pass in both AppID and AppSign (exclude Web platform).
Scope of Impact: Failure to call this function will prevent other member functions from being called.
Platform difference: When calling this function on the Android platform, in addition to the AppID, the Application class object must also be passed in.
Return
ZIM instance.
GetVersion
public static string GetVersion()ZIM.csGet the SDK version.
- Use cases: 1. When the SDK is running, the developer finds that it does not match the expected situation and submits the problem and related logs to the ZEGO technical staff for locating. The ZEGO technical staff may need the information of the engine version to assist in locating the problem.
- Developers can also collect this information as the version information of the engine used by the app, so that the SDK corresponding to each version of the app on the line.
When to call : It can be called at any time.
- Available since: 1.1.0.
SDK version.
GetInstance
public static ZIM GetInstance()ZIM.cs- When to call: You must call [Create] to create an instance before calling this function to obtain a singleton object, otherwise it will return [null].
Related interface: [Create].
SetLogConfig
public static void SetLogConfig(ZIMLogConfig config)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMLogConfig | Log configuration object. |
- Default value: /storage/Android/data/[Application ID]/files/ZIMLogs
- When to call: It must be called before [Create].
If the developer calls after [Create], the SDK will save this configuration until the next time [create] takes effect.
Life cycle: Set before calling [Create], and take effect when calling [Create]. If the developer does not set a new log configuration in the next [create], the previous configuration will still take effect.
Platform difference: The default path of different platforms is different, please refer to the default value.
Related reference: For details, please refer to https://doc-zh.zego.im/faq/IM_sdkLog?product=IM&platform=all.
SetCacheConfig
public static void SetCacheConfig(ZIMCacheConfig config)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMCacheConfig | Cache configuration object. |
- Default value: Android:/storage/Android/data/[packageName]/files/ZIMCaches
iOS:
/Library/Caches/ZIMCaches macOS:(sandbox)/Library/Containers/[Bundle ID]/Data/Library/Caches/ZIMCaches / ~/Library/Caches/ZIMCaches Windows:C:\Users[Your UserName]\AppData[App Name]ZEGO.SDK\ZIMCaches
Call timing: It must be called before [create].
If the developer calls after [create], the SDK saves the configuration until it takes effect the next time [Create] is invoked.
- Related callbacks: In addition to getting the login result in the callback parameter, the developer will also receive the [onConnectionStateChanged] callback during the login request and after the login is successful/failed to determine the current user's login status.
Life cycle: Set before calling [create] and takes effect when calling [create]. If the developer does not set the new caches configuration the next time [create] is created, the previous configuration will still take effect.
Platform difference: The default path varies with platforms. Please refer to the default value.
Login
public abstract void Login(ZIMUserInfo userInfo,string token,ZIMLoggedInCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userInfo | ZIMUserInfo | Unique ID used to identify the user. Note that the userID must be unique under the same appID, otherwise mutual kicks out will occur. Note: Do not set ZIMUserInfo.userAvatarUrl through this interface. |
| token | string | The token issued by the developer's business server, used to ensure security. The generation rules are detailed in ZEGO document website. The token validity period cannot exceed 24 days. |
| callback | ZIMLoggedInCallback |
- Related callbacks: In addition to getting the login result in the callback parameter, the developer will also receive the [onConnectionStateChanged] callback during the login request and after the login is successful/failed to determine the current user's login status.
FAQ: How is the RTC login different from ZEGO's? RTC login refers to the login to the room, ZIM login to the account.
Related reference: For details, please refer to Authentication (https://docs.zegocloud.com/article/13772).
Return
Callback of login result.
Login
public abstract void Login(ZIMUserInfo userInfo,ZIMLoggedInCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userInfo | ZIMUserInfo | Unique ID used to identify the user. Note that the userID must be unique under the same appID, otherwise mutual kicks out will occur. Note: Do not set ZIMUserInfo.userAvatarUrl through this interface. |
| callback | ZIMLoggedInCallback |
- Related callbacks: In addition to getting the login result in the callback parameter, the developer will also receive the [OnConnectionStateChanged] callback during the login request and after the login is successful/failed to determine the current user's login status.
Return
Callback of login result.
RenewToken
public abstract void RenewToken(string token,ZIMTokenRenewedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| token | string | The token issued by the developer's business server, used to ensure security. The generation rules are detailed in ZEGO document website. |
| callback | ZIMTokenRenewedCallback | Callback of the renewing token result. |
Details
Update the authentication token so that the authentication token can be updated in time after it expires, so as to continue to use ZIM functions normally.
- Use cases: When you need to create a multi-person chat scene, you can create and join a room by this API.
- When to call: This function must be called through the instance after calling [Create] to create the instance.
- Caution: After the developer receives the [OnTokenWillExpire] callback, the developer needs to request the authentication server to regenerate a token in time.
- Available since: 1.1.0 or above.
Return
Callback of the renewing token result.
QueryUsersInfo
public void QueryUsersInfo(List\<string> userIDs,ZIMUsersInfoQueryConfig config,ZIMUsersInfoQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userIDs | List<string> | userID list. |
| config | ZIMUsersInfoQueryConfig | Query user information configuration. |
| callback | ZIMUsersInfoQueriedCallback | Callback for querying user information returns the query result. |
Details
Through this interface, you can query and obtain the corresponding UserInfo by userID.
- When to call /Trigger: It is available only after calling [Create] to create the instance and then calling [Login] to login.
- Related callbacks: [ZIMUsersInfoQueriedCallback].
Usage restrictions: No more than 10 userids can be queried by invoking the interface at a time. If the interface is invoked multiple times within 10 seconds, the total number of userids queried cannot exceed 10.
- Available since: 2.3.0 or above.
Return
Callback of the query user result.
UpdateUserName
public abstract void UpdateUserName(string userName,ZIMUserNameUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userName | string | User name , It is customized by the developer. For version 2.0.0 and onwards, the string has a maximum length of 256 bytes. |
| callback | ZIMUserNameUpdatedCallback | The callback of the update user name. |
Details
After user logs in, calling this interface could update the user's own user name.
- When to call: After the user is logged in.
This interface does not support modifying user names in rooms.
- Privacy reminder: Try not to pass in sensitive information involving personal privacy, including but not limited to mobile phone numbers, ID numbers, passport numbers, real names, etc.
- Related callbacks: [ZIMUserNameUpdatedCallback].
- Related APIs: [updateUserExtendedData] and [QueryUsersInfo].
- Available since: 2.2.0 or above.
Return
The result of the update user name.
UpdateUserAvatarUrl
public abstract void UpdateUserAvatarUrl(string userAvatarUrl,ZIMUserAvatarUrlUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userAvatarUrl | string | User avatar URL wanted to changed to . |
| callback | ZIMUserAvatarUrlUpdatedCallback | Callback for user profile picture update. |
Details
Supported versions: 2.3.0 and above.
Detail description: After the user logs in, calling this interface can set or update the user's own user avatar URL.
Call timing/notify timing: After the user logs in.
The user avatar itself needs to be stored by the developer, and ZIM only saves its user information as a pass-through URL.
Usage Restriction: There is no limit on special characters and a maximum of 500 bytes.
Related callback: [ZIMUserAvatarUrlUpdatedCallback].
Related interface: [QueryUsersInfo].
Return
The result of the update user avatar URL.
UpdateUserExtendedData
public abstract void UpdateUserExtendedData(string extendedData,ZIMUserExtendedDataUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| extendedData | string | User extended data wanted to changed to . |
| callback | ZIMUserExtendedDataUpdatedCallback | The callback of the update user extended data. |
Details
After user logs in, calling this interface could update the user's own user extended data.
- When to call: After the user is logged in.
- Privacy reminder: Try not to pass in sensitive information involving personal privacy, including but not limited to mobile phone numbers, ID numbers, passport numbers, real names, etc.
- Related callbacks: [ OnUserNameUpdatedCallback ].
- Related APIs: [ UpdateUserName] and [ QueryUsersInfo ].
- Available since: 2.2.0 or above.
Return
The result of the update user extended data.
UploadLog
public abstract void UploadLog(ZIMLogUploadedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| callback | ZIMLogUploadedCallback |
- Related callbacks: Developers can get the upload results through the callback parameter.
Return
The result of the log upload.
Logout
public abstract void Logout()ZIM.csLog out of the ZIM service.
- Use cases: This function must be called from the instance after it has been created by calling [Create].
- When to call: After invoking [Logout], you can no longer use ZIM's chat, room, send and receive, and other functions. To use the ZIM service again, the developer must call [Login] to login again.
- Caution: Upon logout, the developer will receive the [OnConnectionStateChanged] callback with the login state being [Disconnected].
- Available since: 1.1.0 or above.
Destroy
public abstract void Destroy()ZIM.csSupported version: 1.1.0 and above.
Detailed description: Release the resources used by the ZIM instance. This function must be called to release the occupied memory resources when ZIM is no longer needed, otherwise a memory leak may occur.
Call timing: call when ZIM is no longer needed, usually before emptying the ZIM object.
After calling this function, ZIM internal functions can no longer be used, and all callback notifications will no longer be triggered. If you need to continue using the ZIM function, please call [Create] again to create a new instance.
CallInvite
public abstract void CallInvite(List\<string> invitees,ZIMCallInviteConfig config,ZIMCallInvitationSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| invitees | List<string> | list of invitees. |
| config | ZIMCallInviteConfig | Call Invitation Related Configuration. |
| callback | ZIMCallInvitationSentCallback | Callback for initiating a call invitation. |
- When to call: It can be called after creating a ZIM instance through [create].
The call invitation has a timeout period, and the call invitation will end when the timeout period expires.
- Related callbacks: [ZIMCallInvitationSentCallback].
Return
Callback of the call invite result.
CallCancel
public abstract void CallCancel(List\<string> invitees,string callID,ZIMCallCancelConfig config,ZIMCallCancelSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| invitees | List<string> | List of invitees. |
| callID | string | The ID of the call invitation to cancel. |
| config | ZIMCallCancelConfig | Cancel the related configuration of call invitation. |
| callback | ZIMCallCancelSentCallback | Callback for canceling a call invitation. |
- When to call: It can be called after creating a ZIM instance through [Create].
Canceling the call invitation after the timeout period of the call invitation expires will fail.
- Related callbacks: [ZIMCallCancelSentCallback].
Return
Callback of the call cancel result.
CallAccept
public abstract void CallAccept(string callID,ZIMCallAcceptConfig config,ZIMCallAcceptanceSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| callID | string | The call invitation ID to accept. |
| config | ZIMCallAcceptConfig | Configuration related to accepting call invitations. |
| callback | ZIMCallAcceptanceSentCallback | Callback to accept call invitation. |
- When to call: It can be called after creating a ZIM instance through [Create].
The callee will fail to accept an uninvited callid.
- Related callbacks: [ZIMCallAcceptanceSentCallback].
Return
Callback of the call accept result.
CallReject
public abstract void CallReject(string callID,ZIMCallRejectConfig config,ZIMCallRejectionSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| callID | string | The ID of the call invitation to be rejected. |
| config | ZIMCallRejectConfig | Related configuration for rejecting call invitations. |
| callback | ZIMCallRejectionSentCallback | Callback for rejecting call invitations. |
- When to call: It can be called after creating a ZIM instance through [Create].
The callee will fail to reject the uninvited callid.
- Related callbacks: [ZIMCallRejectionSentCallback].
Return
Callback of the call reject result.
CallQuit
public abstract void CallQuit(string callID,ZIMCallQuitConfig config,ZIMCallQuitSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| callID | string | The ID of the call invitation to be quit. |
| config | ZIMCallQuitConfig | Related configuration for quit call invitations. |
| callback | ZIMCallQuitSentCallback | Callback for quit call invitations. |
- When to call: After a call is established, users whose call status is accept can call this interface.
The callee will fail to quit the uninvited callid.
- Related callbacks: [ZIMCallQuitSentCallback].
Return
Callback of the call quit result.
CallEnd
public abstract void CallEnd(string callID,ZIMCallEndConfig config,ZIMCallEndSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| callID | string | The ID of the call invitation to be ended. |
| config | ZIMCallEndConfig | Related configuration for end call invitations. |
| callback | ZIMCallEndSentCallback | Callback for end call invitations. |
- When to call: The call was in advanced mode and the user status was Accepted.
User calls that are not in the call will fail. ZIM SDK Does not have service logic after the call ends, and developers can customize the development logic after the end.
- Related callbacks: [ZIMCallEndSentCallback].
Return
Callback of the call end result.
CallingInvite
public abstract void CallingInvite(List\<String> invitees,string callID,ZIMCallingInviteConfig config,ZIMCallingInvitationSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| invitees | List<String> | List of invited user ids. |
| callID | string | callID of the current call in advanced mode. |
| config | ZIMCallingInviteConfig | This section describes how to configure the call invitation. |
| callback | ZIMCallingInvitationSentCallback | Invite the callback of the current call. |
- When to call: After calling [callInvite] to initiate a call invitation in advanced mode or after the called party accepts the advanced mode call invitation.
User calls that are not in the call will fail. ZIM SDK has no relevant business logic after accepting. Developers can customize the development logic after adding calls. By default, a call can contain a maximum of 9 users.
- Related callbacks: [ZIMCallingInvitationSentCallback].
Return
Callback result of inviting the current call.
QueryCallInvitationList
public abstract void QueryCallInvitationList(ZIMCallInvitationQueryConfig config,ZIMCallInvitationListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMCallInvitationQueryConfig | Query the relevant configuration of the call invitation list. |
| callback | ZIMCallInvitationListQueriedCallback | Inquire the results of the call invitation list. |
- When to call: Run [Create] to create a ZIM instance, which can be invoked after login.
- Related callbacks: [ZIMCallInvitationListQueriedCallback].
Return
Inquire the results of the call invitation list.
CreateGroup
public abstract void CreateGroup(ZIMGroupInfo groupInfo,List\<string> userIDs,ZIMGroupCreatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupInfo | ZIMGroupInfo | Configuration information for the group to be created. |
| userIDs | List<string> | List of users invited to the group. |
| callback | ZIMGroupCreatedCallback | Callback for the result of creating a group. |
Details
You can call this interface to create a group, and the person who calls this interface is the group leader. An empty string if the group name is left blank.
- Use cases: You can use this interface to create a chat scenario and join a group.
- When to call: After you create a ZIM instance with [create] and login with [login].
- Impacts on other APIs: You can use [JoinGroup] to join a group, [LeaveGroup] to leave a group, or [DismissGroup] to dismiss a group.
- Related callbacks: The result of creating the group is obtained through the [ZIMGroupCreatedCallback] callback.
- Related APIs: Call [JoinGroup] to join a group, call [LeaveGroup] to leave a group, call [DismissGroup] to dismiss a group.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout. UserIDs support a maximum of 100 users .
SearchLocalGroups
public abstract void SearchLocalGroups(ZIMGroupSearchConfig config,ZIMGroupsSearchedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMGroupSearchConfig | Configuration for searching groups. |
| callback | ZIMGroupsSearchedCallback | Callback of the search groups result. |
- Related callbacks: [ZIMGroupsSearchedCallback].
- Restrictions: Takes effect after login, becomes invalid after logout.
Return
Callback of the search groups result.
SearchLocalGroupMembers
public abstract void SearchLocalGroupMembers(string groupID,ZIMGroupMemberSearchConfig config,ZIMGroupMembersSearchedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | Group ID of the joined group. |
| config | ZIMGroupMemberSearchConfig | The configuration for searching group members. |
| callback | ZIMGroupMembersSearchedCallback | Callback for the result of searching group members. |
- Related callbacks: [ZIMGroupMembersSearchedCallback].
- Restrictions: Takes effect after login, becomes invalid after logout.
Return
Callback for the result of searching group members.
CreateGroup
public abstract void CreateGroup(ZIMGroupInfo groupInfo,List<string> userIDs,ZIMGroupAdvancedConfig config,ZIMGroupCreatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupInfo | ZIMGroupInfo | Configuration information for the group to be created. |
| userIDs | List<string> | List of users invited to the group. |
| config | ZIMGroupAdvancedConfig | Create the relevant configuration of the group. |
| callback | ZIMGroupCreatedCallback | Callback for the result of creating a group. |
Details
You can call this interface to create a group, and the person who calls this interface is the group leader.
- Use cases: You can use this interface to create a chat scenario and join a group.
- When to call /Trigger: The ZIM instance can be invoked after being created by [create] and logged in.
- Caution: Available after login, unavailable after logout. UserIDs can have a maximum of 100 users and a group can have a maximum of 500 users.
- Related callbacks: The result of creating the group is obtained through the [ZIMGroupCreatedCallback] callback.
- Related APIs: You can use [JoinGroup] to join a group, [LeaveGroup] to leave a group, or [DismissGroup] to dismiss a group.
- Available since: 2.0.0 and above.
Return
Callback for the result of creating a group.
JoinGroup
public delegate void JoinGroup(string groupID,ZIMGroupJoinedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | The group ID to join. |
| callback | ZIMGroupJoinedCallback | Callback for the result of joining the group. |
Details
When a group is created, other users can join the group through [JoinGroup]. If the group does not exist, the joining fails.
- Use cases: This interface is used to join a group in a chat scenario.
- When to call /Trigger: The ZIM instance can be invoked after being created by [create] and logged in.
- Caution: Available after login, unavailable after logout. If you have joined a group, the join succeeds.
- Related callbacks: To get the result of joining the room, call [ZIMGroupJoinedCallback].
- Related APIs: You can use [CreateGroup] to create a group, [LeaveGroup] to leave a group, or [DismissGroup] to dismiss a group.
- Available since: 2.0.0 and above.
Return
Callback for the result of joining the group.
LeaveGroup
public abstract void LeaveGroup(string groupID,ZIMGroupLeftCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | The group ID to leave. |
| callback | ZIMGroupLeftCallback | Callback for the result of leaving the group. |
Details
After a user joins a group, the user can leave the group through this interface.
- Use cases: This interface is used to exit a chat group.
- When to call /Trigger: It can be invoked after a ZIM instance is created through [create] and logged in.
- Caution: When the group owner quits the group, the identity of the group owner will be automatically transferred to the earliest member who joined the group. When all members exit the group, the group is automatically dissolved.
- Impacts on other APIs: You can use [CreateGroup] to create a group, [JoinGroup] to join a group, or [DismissGroup] to dismiss a group.
- Related callbacks: The result of leaving the room can be obtained by the [ZIMGroupLeftCallback] callback.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout.
Return
Callback for the result of leaving the group.
DismissGroup
public void DismissGroup(string groupID,ZIMGroupDismissedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | The ID of the group to be disbanded. |
| callback | ZIMGroupDismissedCallback | Callback for the result of disbanding the group. |
Details
When a group is created, you can use [DismissGroup] to dismiss it.
- Use cases: After you create a chat group, you do not need to use this interface to dissolve the group.
- When to call /Trigger: This parameter can be called after a group is created by using [CreateGroup].
- Caution: A non-group owner cannot dissolve a group.
- Related callbacks: Through callback can get [ZIMGroupDismissedCallback] dissolution results of the room, through [onGroupStateChanged] listen callback can get the room status.
- Related APIs: You can use [CreateGroup] to create a group, [JoinGroup] to join a group, and [LeaveGroup] to leave a group.
- Available since: 2.0.0 and above.
Return
Callback for the result of disbanding the group.
KickGroupMembers
public abstract void KickGroupMembers(List\<string> userIDs,string groupID,ZIMGroupMemberKickedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userIDs | List<string> | List of users who have been kicked out of the group. |
| groupID | string | The group ID of the member who will be kicked out. |
| callback | ZIMGroupMemberKickedCallback | Callback for the result of being kicked out of the group. |
Details
After a user joins a group, you can use this method to remove the user from the group.
- Use cases: You can use this method to remove one or more users from the group.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Caution: This interface does not require the peer's consent or the peer's online status. It cannot accept group-related callbacks after being kicked out. History messages and sessions remain after being kicked out and can still enter the group.
- Related callbacks: Through the callback [ZIMGroupMemberKickedCallback] can get the user kicked out the results of the group.
- Related APIs: You can invite a target user into a group through [InviteUsersIntoGroup].
- Available since: 2.0.0 and above.
- Restrictions: You can't kick someone unless you're the leader of the group.
Return
Callback for the result of being kicked out of the group.
InviteUsersIntoGroup
public void InviteUsersIntoGroup(List\<string> userIDs,string groupID,ZIMGroupUsersInvitedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userIDs | List<string> | List of users who have been invited to the group, the maximum number supported in a single operation is 100. |
| groupID | string | The group ID of the member who will be invited to join. |
| callback | ZIMGroupUsersInvitedCallback | Callback for the result of being invited to the group. |
Details
When users need to be invited to join the group, they can be invited to the group by this method. If the group does not exist, the invitation will fail.
- Use cases: You can use this method to invite one or more users to the group.
- When to call /Trigger: The ZIM instance can be invoked after being created by [create] and logged in.
- Caution: This interface does not require the peer's consent or the peer's online status.
- Related callbacks: Through the callback [ZIMGroupUsersInvitedCallback] can get the user invited to the results of the group.
- Related APIs: You can kick out a target user into a group through [KickGroupMembers].
- Available since: 2.0.0 and above.
- Restrictions: You can't invite someone unless you're the leader of the group.
Return
Callback for the result of being invited to the group.
TransferGroupOwner
public abstract void TransferGroupOwner(string toUserID,string groupID,ZIMGroupOwnerTransferredCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| toUserID | string | The converted group owner ID. |
| groupID | string | The group ID of the group owner to be replaced. |
| callback | ZIMGroupOwnerTransferredCallback | The callback of the transfer group owner. |
Details
After a group is created, the group owner can use this method to assign the group owner to a specified user.
- Use cases: In a group chat scenario, you can transfer the group master through this interface.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through the callback [ZIMGroupOwnerTransferredCallback] can get the result of the transfer of the group manager.
- Available since: 2.0.0 and above.
- Restrictions: You cannot transfer a group owner if you are not a group owner.
Return
The callback of the transfer group owner.
UpdateGroupName
public abstract void UpdateGroupName(string groupName,string groupID,ZIMGroupNameUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupName | string | The group name that needs to be updated. |
| groupID | string | The group ID whose group name will be updated. |
| callback | ZIMGroupNameUpdatedCallback | Callback for the result of updating the group name. |
Details
After a group is created, users can call this method to change the group name.
- Use cases: After creating a group, you need to change the group name.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through the callback [ZIMGroupNameUpdatedCallback] can get the result of the change of name, through [OnGroupNoticeUpdated] can get update group name information.
- Available since: 2.0.0 and above.
- Restrictions: Group members and group owners can change the group name. The maximum length of the name is 100 bytes.
Return
Callback for the result of updating the group name.
UpdateGroupAvatarUrl
public abstract void UpdateGroupAvatarUrl(string groupAvatarUrl,string groupID,ZIMGroupAvatarUrlUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupAvatarUrl | string | The group avatar URL that needs to be updated. Usage Restriction: There is no limit on special characters and a maximum of 500 bytes. |
| groupID | string | The group ID of the group avatar URL that will be updated. |
| callback | ZIMGroupAvatarUrlUpdatedCallback | Callback for the result of updating the group avatar URL. |
- Related callbacks: The result of changing the group name can be obtained through the [ZIMGroupAvatarUrlUpdatedCallback] callback, and the updated group avatar information can be obtained through the [OnGroupAvatarUrlUpdated] callback.
Return
Callback for the result of updating the group avatar URL.
UpdateGroupNotice
public abstract void UpdateGroupNotice(string groupNotice,string groupID,ZIMGroupNoticeUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupNotice | string | Pre-updated group announcements. |
| groupID | string | The group ID of the group announcement that will be updated. |
| callback | ZIMGroupNoticeUpdatedCallback | Callback to update the results of group announcements. |
Details
When a group is created, users can use this method to update the group bulletin.
- Use cases: You need to update the group bulletin in the group.
- When to call /Trigger: The ZIM instance can be invoked after being created by [create] and logged in.
- Related callbacks: Through callback [ZIMGroupNoticeUpdateCallback] can get update group of the results announcement, announcement by [OnGroupNoticeUpdated] can get update group information.
- Available since: 2.0.0 and above.
- Restrictions: Only group members can update the group bulletin. The maximum number of bytes is 300. There is no special character limit.
Return
Callback to update the results of group announcements.
QueryGroupInfo
public abstract void QueryGroupInfo(string groupID,ZIMGroupInfoQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | The group ID of the group information to be queried. |
| callback | ZIMGroupInfoQueriedCallback | Callback for the result of querying group information. |
Details
Query information about a created group.
- Use cases: You need to obtain group information for display.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through the callback [ZIMGroupInfoQueriedCallback] can query the result of the group information.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout.
Return
Callback for the result of querying group information.
QueryGroupList
public abstract void QueryGroupList(ZIMGroupListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| callback | ZIMGroupListQueriedCallback | Callback for querying the result of the group list. |
Details
Query the list of all groups.
- Use cases: You need to get a list of groups to display.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through the callback [ZIMGroupListQueiedCallback] can get a check list of all current group results.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout.
Return
Callback for querying the result of the group list.
SetGroupAttributes
public abstract void SetGroupAttributes(Dictionary<string, string> groupAttributes,string groupID,ZIMGroupAttributesOperatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupAttributes | Dictionary<string, string> | group attributes. |
| groupID | string | groupID. |
| callback | ZIMGroupAttributesOperatedCallback | Callback for setting group attributes. |
Details
If a group already exists, all users of the group can use this method to set group attributes.
- Use cases: Added extended field information about group description, such as group family, label, and industry category.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through the callback [ZIMGroupAttributesOperatedCallback] can get the result of the set of attributes.
- Related APIs: [DeleteGroupAttributes] can be used to deleteGroupAttributes, [QueryGroupAttributes] can be used to queryGroupAttributes, [QueryAllGroupAttributes] can be used to queryAllGroupAttributes.
- Available since: 2.0.0 and above.
- Restrictions: Only group members can set group attributes.
Return
Callback for setting group attributes.
DeleteGroupAttributes
public abstract void DeleteGroupAttributes(List<string> keys,string groupID,ZIMGroupAttributesOperatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| keys | List<string> | The key of the group attribute to delete. |
| groupID | string | The group ID of the group attribute to be deleted. |
| callback | ZIMGroupAttributesOperatedCallback | Callback for the result of removing the group attributes. |
Details
When a group already exists, you can use this method to delete group attributes. Both the master and members of the interface group can be invoked.
- Use cases: Deleted the extended field of the group description.
- When to call /Trigger: The ZIM instance can be invoked after being created by [create] and logged in.
- Related callbacks: Through the callback [ZIMGroupAttributesOperatedCallback] can delete the result of the group of attributes.
- Related APIs: You can use [SetGroupAttributes] to setGroupAttributes, [QueryGroupAttributes] to queryGroupAttributes, and [QueryAllGroupAttributes] to queryAllGroupAttributes.
- Available since: 2.0.0 and above.
- Restrictions: Only group members can delete group attributes.
Return
Callback for the result of removing the group attributes.
QueryGroupAttributes
public abstract void QueryGroupAttributes(List\<string> keys,string groupID,ZIMGroupAttributesQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| keys | List<string> | The key of the group attribute to be queried. |
| groupID | string | The group ID of the group attribute to be queried. |
| callback | ZIMGroupAttributesQueriedCallback | Callback for the result of querying group attributes. |
Details
After a group is created, you can use this method to query the specified group attributes.
- Use cases: You need to query the scenarios to display the specified group attributes.
- When to call /Trigger: After creating a ZIM instance with [Create] and logging in with [Login].
- Related callbacks: Through the callback [ZIMGroupAttributesQuriedCallback] can get query attributes of the specified group of results.
- Related APIs: [QueryAllGroupAttributes] Queries all group attributes.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout.
Return
Callback for the result of querying group attributes.
QueryGroupAllAttributes
public abstract void QueryGroupAllAttributes(string groupID,ZIMGroupAttributesQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | The group ID of all group attributes to be queried. |
| callback | ZIMGroupAttributesQueriedCallback | Callback for querying the result of all attributes of the group. |
Details
After a group is created, you can use this method to query all group attributes.
- Use cases: Scenarios where all group attributes need to be queried.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through callback can get query [ZIMGroupAttributesQuriedCallback] all the results of the group of attributes.
- Related APIs: [QueryGroupAttributes] Queries the attributes of the specified group.
- Available since: 2.0.0 and above.
Return
Callback for querying the result of all attributes of the group.
SetGroupMemberRole
public abstract void SetGroupMemberRole(int role,string forUserID,string groupID,ZIMGroupMemberRoleUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| role | int | Set of group roles。 - 2: Administrator. - 3: Ordinary members. - Other values: The group role can be customized, and the permissions are the same as those of ordinary members. It is recommended that the value be greater than 100. |
| forUserID | string | User ID for which group role is set. |
| groupID | string | The group ID of the group role to be set. |
| callback | ZIMGroupMemberRoleUpdatedCallback | Callback to set the result of the group member role. |
Details
After a group is created, you can use this method to set the roles of group members.
- Use cases: The ZIM instance can be invoked after being created by [Create] and logged in.
- When to call /Trigger: If the primary role of a group is 1 and the default role of other members is 3, you can invoke this interface to change the role.
- Caution: The role of the group owner is 1, the role of the administrator is 2, and the role of the normal member is 3. You can modify it by calling this interface, but the role cannot be changed to 1. If you need to customize the role, it is recommended to set the value to 100 or higher, and its permissions will be the same as those of normal members.
- Related callbacks: Through the callback [ZIMGroupMemberRoleUpdatedCallback] can be set up to get the results of the group of members of the role.
- Available since: 2.0.0 and above.
- Restrictions: Non-group master unavailable.
Return
Callback to set the result of the group member role.
SetGroupMemberNickname
public abstract void SetGroupMemberNickname(string nickname,string forUserID,string groupID,ZIMGroupMemberNicknameUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| nickname | string | Set member nickname. |
| forUserID | string | User ID for which group nickname is set. |
| groupID | string | The group ID of the group member's nickname is set. |
| callback | ZIMGroupMemberNicknameUpdatedCallback | Callback for the result of setting the group member's nickname. |
Details
After a group is created, you can use this method to set nicknames for group members.
- Use cases: Nicknames need to be set for group members.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Caution: A group member nickname can contain a maximum of 100 characters.
- Related callbacks: Through the callback [ZIMGroupMemberNicknameUpdatedCallback] can be set up to get the results of the group members nickname.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout. The owner of a group can change his or her own nickname, while the members can change only their own nickname.
Return
Callback for the result of setting the group member's nickname.
QueryGroupMemberInfo
public abstract void QueryGroupMemberInfo(string userID,string groupID,ZIMGroupMemberInfoQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userID | string | User ID of the queried member information. |
| groupID | string | The ID of the group whose member information will be queried. |
| callback | ZIMGroupMemberInfoQueriedCallback | Callback for the result of querying group member information. |
Details
After a group is created, you can use this method to query information about a specified group member.
- Use cases: You need to obtain the specified group member information for display or interaction.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through the callback [ZIMGroupMemberInfoQueriedCallback] can get the query specifies the result of group membership information.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout.
Return
Callback for the result of querying group member information.
QueryGroupMemberList
public abstract void QueryGroupMemberList(string groupID,ZIMGroupMemberQueryConfig config,ZIMGroupMemberListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | The group ID of the group member list to be queried. |
| config | ZIMGroupMemberQueryConfig | Group member query configuration. |
| callback | ZIMGroupMemberListQueriedCallback | Callback for querying the list of group members. |
Details
After a group is created, you can use this method to query the group member list.
- Use cases: You need to obtain the specified group member list for display or interaction.
- When to call /Trigger: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: Through the callback [ZIMGroupMemberListQueriedCallback] can query the result of the group member list.
- Available since: 2.0.0 and above.
- Restrictions: Available after login, unavailable after logout.
Return
Callback for querying the list of group members.
QueryGroupMemberCount
public void QueryGroupMemberCount(string groupID,ZIMGroupMemberCountQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| groupID | string | The group ID of the group to be queried. |
| callback | ZIMGroupMemberCountQueriedCallback | Callback for querying the number of groups. |
Details
Query the number of group members in a group.
- When to call: The ZIM instance can be invoked after being created by [Create] and logged in.
- Related callbacks: [ZIMGroupMemberCountQueriedCallback].
- Available since: 2.2.0 or above.
- Restrictions: This function can only query the group that the user has entered.
Return
Callback for querying the number of groups.
QueryConversation
public void QueryConversation(string conversationID,ZIMConversationType conversationType,ZIMConversationQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | Conversation ID. |
| conversationType | ZIMConversationType | Conversation type. |
| callback | ZIMConversationQueriedCallback | Callback for conversation query. |
Details
This method displays the session list of the logged in user.
- Use cases: When you need to know the relevant information of the specified conversation, you can call this interface to obtain the data source.
- When to call /Trigger: Can be invoked after login.
- Related callbacks: [ZIMConversationQueriedCallback].
- Available since: 2.8.0 and above.
- Restrictions: There is no limit to the frequency of use, available after login, unavailable after logout.
Return
Callback of the query conversation result.
QueryConversationList
public abstract void QueryConversationList(ZIMConversationQueryConfig config,ZIMConversationListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMConversationQueryConfig | Configuration for session queries. |
| callback | ZIMConversationListQueriedCallback | Callback for session query. |
Details
This method displays the session list of the logged in user.
- Use cases: This interface can be invoked to get the data source when you need to display an existing message session after logging in.
- When to call /Trigger: Can be invoked after login.
- Caution: NextConversation is the riveting point of the query message, which can be null for the first query. In subsequent query, the earliest conversation can be used as nextConversation to query earlier sessions. In paging query, Count in [ZIMConversationQueryConfig] fill each pull the number of sessions.
- Related callbacks: [ZIMConversationListQueriedCallback].
- Related APIs: [DeleteConversation] Deletes the session. [ClearConversationUnreadMessageCount] clear session readings.
- Available since: 2.0.0 and above.
- Restrictions: There is no limit to the frequency of use, available after login, unavailable after logout.
Return
Callback of the query conversation list result.
QueryConversationPinnedList
public void QueryConversationPinnedList(ZIMConversationQueryConfig config,ZIMConversationPinnedListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMConversationQueryConfig | Configuration for session queries. |
| callback | ZIMConversationPinnedListQueriedCallback | Callback for conversation pinned list query. |
Details
This method displays the pinned conversation list of the logged in user.
- Use cases: This interface can be invoked to get the data source when you need to display an existing pinned message conversation after logging in.
- When to call /Trigger: Can be invoked after login.
- Caution: NextConversation is the riveting point of the query message, which can be null for the first query. In subsequent query, the earliest conversation can be used as nextConversation to query earlier sessions. In paging query, Count in [ZIMConversationQueryConfig] fill each pull the number of sessions.
- Available since: 2.8.0 and above.
- Restrictions: There is no limit to the frequency of use, available after login, unavailable after logout.
UpdateConversationPinnedState
public void UpdateConversationPinnedState(bool isPinned,string conversationID,ZIMConversationType conversationType,ZIMConversationPinnedStateUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| isPinned | bool | Whether the conversation is pinned, true is pinned, false is unpinned. |
| conversationID | string | Conversation ID. |
| conversationType | ZIMConversationType | Conversation type. |
| callback | ZIMConversationPinnedStateUpdatedCallback | Callback for updating the pinned state of the conversation. |
Details
This method can modify the pinned state of the specified conversation of the logged-in user.
- Use cases: You can call this interface when you need to modify the pinned state of a conversation.
- When to call /Trigger: Can be invoked after login.
- Related callbacks: [ZIMConversationPinnedStateUpdatedCallback].
- Available since: 2.8.0 and above.
- Restrictions: Available after login, unavailable after logout.
DeleteConversation
public abstract void DeleteConversation(string conversationID,ZIMConversationType conversationType,ZIMConversationDeleteConfig config,ZIMConversationDeletedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | conversationID. |
| conversationType | ZIMConversationType | conversationtype. |
| config | ZIMConversationDeleteConfig | delete the session's configuration. |
| callback | ZIMConversationDeletedCallback | Callback to delete session. |
Details
This interface is invoked when a session needs to be deleted. All members in the session can invoke this interface.
- Use cases: You can invoke this interface implementation to delete an entire session when it is no longer needed.
- When to call /Trigger: his parameter is invoked when a session needs to be deleted and can be invoked after a ZIM instance is created. The call takes effect after login and becomes invalid after logout.
- Impacts on other APIs: A successful call triggers the DeleteConversation callback. If the deleted conversation contains unread messages, the [onConversationTotalUnreadMessageCountUpdated] callback is triggered.
- Related callbacks: [ZIMConversationDeletedCallback]
- Available since: 2.0.0 and above.
Return
Callback of the delete conversation result.
ClearConversationUnreadMessageCount
public abstract void ClearConversationUnreadMessageCount(string conversationID,ZIMConversationType conversationType,ZIMConversationUnreadMessageCountClearedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | conversationID. |
| conversationType | ZIMConversationType | conversation type. |
| callback | ZIMConversationUnreadMessageCountClearedCallback | Callback to remove session unreads. |
Details
Used to clear unread for the current user target session.
- Use cases: This interface is called when a chat page is entered from a session and the original message readings of the session need to be cleared.
- When to call /Trigger: Called when a target needs to be cleared without readings.
- Impacts on other APIs: Calling this method will trigger a total readings not updated callback [OnConversationTotalUnreadMessageCountUpdated], would trigger a session to update callbacks [OnConversationChanged].
- Related callbacks: [ZIMConversationUnreadMessageCountClearedCallback].
- Related APIs: [OnConversationTotalUnreadMessageCountUpdated]、[OnConversationChanged].
- Available since: 2.0.0 and above.
- Restrictions: Valid after login, invalid after logout.
Return
Callback of the clear conversation unread message count result.
SetConversationNotificationStatus
public abstract void SetConversationNotificationStatus(ZIMConversationNotificationStatus status,string conversationID,ZIMConversationType conversationType,ZIMConversationNotificationStatusSetCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| status | ZIMConversationNotificationStatus | the session notification state. |
| conversationID | string | Conversation ID. Currently, only "group" conversations and "peer"(only for 2.14.0 or above version) conversations can be set by notification state. For group conversations, the conversation ID is the group ID. For single chat conversations, the conversation ID is the user ID of the other party. |
| conversationType | ZIMConversationType | conversation type. Currently, only "group" conversations and "peer"(only for 2.14.0 or above version) conversations can be set by notification state. |
| callback | ZIMConversationNotificationStatusSetCallback | Callback for setting session notification status. |
Details
This method enables DND by selecting whether the unread of the target session is updated when a message is received.
- Use cases: If the user selects MESSAGE DO not Disturb (DND), the user can call the corresponding method.
- Default value: Message DND is disabled by default.
- When to call /Trigger: If the target session exists after login, invoke this interface if you want to enable the DND status of the target session.
- Impacts on other APIs: After the DND state is enabled, receiving messages is not triggered [OnConversationTotalUnreadMessageCountUpdated]。
- Related callbacks: [ZIMConversationNotificationStatusSetCallback]。
- Related APIs: [OnConversationTotalUnreadMessageCountUpdated]。
- Available since: 2.0.0 and above.
- Restrictions: Valid after login, invalid after logout.
Return
Callback of the set conversation notification status result.
SendMessage
public void SendMessage(ZIMMessage message,string toConversationID,ZIMConversationType conversationType,ZIMMessageSendConfig config,ZIMMessageSendNotification notification,ZIMMessageSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | The message to be sent. |
| toConversationID | string | The conversation ID the message needs to be sent. |
| conversationType | ZIMConversationType | Conversation type, supports single chat, room and group chat. |
| config | ZIMMessageSendConfig | Related configuration for sending messages. |
| notification | ZIMMessageSendNotification | Related notifications when messages are sent. |
| callback | ZIMMessageSentCallback | Callback of the sending result of the message. |
- Related APIs: [QueryHistoryMessage], [DeleteAllMessage], [DeleteMessages],[SendMediaMessage].
SendMediaMessage
public void SendMediaMessage(ZIMMediaMessage message,string toConversationID,ZIMConversationType conversationType,ZIMMessageSendConfig config,ZIMMediaMessageSendNotification notification,ZIMMessageSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMediaMessage | When using the message to be sent, modify the type of message according to the type of multimedia message. For example, when sending image messages, use ZIMImageMessage. |
| toConversationID | string | The conversation ID of the message recipient, supports single chat, room and group chat. |
| conversationType | ZIMConversationType | Conversation type, supports single chat, room and group chat. |
| config | ZIMMessageSendConfig | Related configuration for sending messages. |
| notification | ZIMMediaMessageSendNotification | Relevant notifications when sending media messages, including upload progress, etc. |
| callback | ZIMMessageSentCallback | Result callback for sending media messages. |
- Impacts on other APIs: Using this method will trigger the [ReceivePeerMessage] / [ReceiveRoomMessage] / [ReceiveGroupMessage] callback of the message receiver, and will trigger the [ConversationChanged] callback of the sender and receiver. Fires the [ConversationTotalUnreadMessageCountUpdated] callback.
pushconfig only needs to be filled in when you need to use the offline push function. Sending media messages to the room does not support offline push, nor does it support the callbacks [ConversationChanged] and [ConversationTotalUnreadMessageCountUpdated].
- Related callbacks: [ZIMMessageSentResult], [ZIMMediaUploadingProgress], [ReceivePeerMessage], [ReceiveRoomMessage], [ReceiveGroupMessage], [ConversationChanged], [ConversationTotalUnreadMessageCountUpdated].
- Related APIs: [QueryHistoryMessage], [DeleteAllMessage], [DeleteMessages]
Return
Result for sending media messages.
InsertMessageToLocalDB
public abstract void InsertMessageToLocalDB(ZIMMessage message,string conversationID,ZIMConversationType conversationType,string senderUserID,ZIMMessageInsertedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | The message to be sent. |
| conversationID | string | Conversation ID. |
| conversationType | ZIMConversationType | Conversation type. |
| senderUserID | string | The sender ID of this message. |
| callback | ZIMMessageInsertedCallback | The result callback of the inserted message. |
Details
This method can insert a message directly to the local DB on the client side.
- Use cases: The developer can combine the system message type, and convert the callback notification (for example, invite someone into the group, remove someone from the group, etc.) to the system message type on the client side and insert it into the local DB to achieve the effect of the system prompt .
- When to call: It can be called after login.
- Caution: Inserting "command" messages is not supported. To insert a "room" message, upgrade the SDK to 2.13.0 and above.
- Related callbacks: [ZIMMessageInsertedCallback].
- Related APIs: [QueryHistoryMessage], [DeleteAllMessage], [DeleteMessages].
- Available since: 2.4.0 and above.
Return
The result of the inserted message.
SendConversationMessageReceiptRead
public void SendConversationMessageReceiptRead(string conversationID,ZIMConversationType conversationType,ZIMConversationMessageReceiptReadSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | Conversation ID. |
| conversationType | ZIMConversationType | Conversation type, only Peer type is supported. |
| callback | ZIMConversationMessageReceiptReadSentCallback | Set Conversation read callback. |
Details
Set all received receipts of the conversation to be read.
- Use cases: Set all received receipt messages in the entire conversation to be read, and the sender of the message receipt in the conversation will receive the [OnConversationMessageReceiptChanged] callback from ZIMEventHandler.
- When to call: It can be called after login. It is recommended to call before entering the message list page. In the message list page, it is recommended to call [SendMessageReceiptsRead] to batch set the messages that need to be read.
- Caution: Only single chat conversation are allowed.
Related callback: [ZIMConversationMessageReceiptReadSentCallback].
- Related APIs: [SendMessageReceiptsRead], [SendMessage].
- Available since: 2.5.0 and above.
Return
Set Conversation read callback.
SendMessageReceiptsRead
public abstract void SendMessageReceiptsRead(List<ZIMMessage> messageList,string conversationID,ZIMConversationType conversationType,ZIMMessageReceiptsReadSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| messageList | List<ZIMMessage> | The list of messages to be read with no more than 10 messages. |
| conversationID | string | Conversation ID. |
| conversationType | ZIMConversationType | Conversation type. |
| callback | ZIMMessageReceiptsReadSentCallback | Set the result callback of the read message. |
Details
This method can set the receipt of a batch of messages to become read.
- Use cases: Developers can use this method to set a batch of messages with receipts that have been read. If the sender is online, it will receive the [OnMessageReceiptChanged] callback.
- When to call: Callable after login. It is recommended to set the settings for the messages that need to be read on the message list page. It is not recommended to mix with [SendConversationMessageReceiptRead].
- Related callbacks: [ZIMMessageReceiptsReadSentCallback].
- Related APIs: [SendMessage].
- Available since: 2.5.0 and above.
- Restrictions: Only support the settings for received messages with receipt status as PROCESSING.
Return
Set the result callback of the read message.
QueryMessageReceiptsInfo
public abstract void QueryMessageReceiptsInfo(List<ZIMMessage> messageList,string conversationID,ZIMConversationType conversationType,ZIMMessageReceiptsInfoQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| messageList | List<ZIMMessage> | list of messages to query. |
| conversationID | string | Conversation ID. |
| conversationType | ZIMConversationType | Conversation type. |
| callback | ZIMMessageReceiptsInfoQueriedCallback | Callback for the result of querying message receipt information. |
Details
This method can query the receipt information of a batch of messages, including the status, the number of unread users and the number of read users.
- Use cases: If you need to query the receipt status of the message, the number of unread users and the number of read users, you can call this interface.
- When to call: Callable after login. If you need to query the detailed member list, you can query through the interface [QueryGroupMessageReceiptReadMemberList] or [QueryGroupMessageReceiptUnreadMemberList].
- Related callbacks: [ZIMMessageReceiptsInfoQueriedResult].
- Related APIs: [QueryGroupMessageReceiptReadMemberList] , [QueryGroupMessageReceiptUnreadMemberList].
- Available since: 2.5.0 and above.
- Restrictions: Only messages whose statuses are not NONE are supported.
Return
Callback for the result of querying message receipt information.
QueryGroupMessageReceiptReadMemberList
public abstract void QueryGroupMessageReceiptReadMemberList(ZIMMessage message,string groupID,ZIMGroupMessageReceiptMemberQueryConfig config,ZIMGroupMessageReceiptMemberListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | list of messages to query. |
| groupID | string | Group ID. |
| config | ZIMGroupMessageReceiptMemberQueryConfig | query configuration. |
| callback | ZIMGroupMessageReceiptMemberListQueriedCallback | Query the result callback of the specific read member list. |
Details
This method can query the specific read member list of a message sent by a group.
- Use cases: Developers can use this method to query the specific read member list of a message they send.
- When to call: Callable after login.
- Related callbacks: [ZIMGroupMessageReceiptMemberListQueriedCallback].
- Related APIs: If you need to query the receipt status of a certain message or only need to query the read/unread count, you can query through the interface [QueryMessageReceiptsInfo].
- Available since: 2.5.0 and above.
- Restrictions: only supports querying the messages sent by the local end, and the receipt status of the messages is not NONE. If the user is not in the group, or has been kicked out of the group, the corresponding member list cannot be found.
Return
Query the result callback of the specific read member list.
QueryGroupMessageReceiptUnreadMemberList
public abstract void QueryGroupMessageReceiptUnreadMemberList(ZIMMessage message,string groupID,ZIMGroupMessageReceiptMemberQueryConfig config,ZIMGroupMessageReceiptMemberListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | Message to query |
| groupID | string | Group ID. |
| config | ZIMGroupMessageReceiptMemberQueryConfig | query configuration |
| callback | ZIMGroupMessageReceiptMemberListQueriedCallback | Query the result callback of the specific read member list. |
Details
This method can query the specific unread member list of a message sent by a group.
- Use cases: Developers can use this method to query the specific unread member list of a message they send.
- When to call: Callable after login.
- Related callbacks: [ZIMGroupMessageReceiptMemberListQueriedCallback].
- Related APIs: If you need to query the receipt status of a certain message or only need to query the read/unread count, you can query through the interface [QueryMessageReceiptsInfo].
- Available since: 2.5.0 and above.
- Restrictions: only supports querying the messages sent by the local end, and the receipt status of the messages is not NONE. If the user is not in the group, or has been kicked out of the group, the corresponding member list cannot be found.
Return
Query the result callback of the specific read member list.
SearchLocalMessages
public abstract void SearchLocalMessages(string conversationID,ZIMConversationType conversationType,ZIMMessageSearchConfig config,ZIMMessagesSearchedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | The conversation ID of the local message to be search. |
| conversationType | ZIMConversationType | conversation type. |
| config | ZIMMessageSearchConfig | Search the configuration of local messages. |
| callback | ZIMMessagesSearchedCallback | Callback of the search local message result. |
- Related callbacks: [ZIMMessagesSearchedCallback].
- Restrictions: Effective after login, invalid after logout. Searching is not supported in the room scene (conversationType=1).
Return
Callback of the search local message result.
SearchLocalConversations
public abstract void SearchLocalConversations(ZIMConversationSearchConfig config,ZIMConversationsSearchedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMConversationSearchConfig | Global search conversation config. |
| callback | ZIMConversationsSearchedCallback | Callback of the search conversations result. |
- Related callbacks: [ZIMConversationsSearchedCallback].
- Restrictions: effective after logging in and becomes invalid after logging out. Searching is not supported in room scenarios (conversationType=1).
Return
Callback of the search conversations message result.
SearchGlobalLocalMessages
public abstract void SearchGlobalLocalMessages(ZIMMessageSearchConfig config,ZIMMessagesGlobalSearchedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| config | ZIMMessageSearchConfig | Search global the configuration of local messages. |
| callback | ZIMMessagesGlobalSearchedCallback | Callback of the search global local message result. |
- Related callbacks: [ZIMMessagesGlobalSearchedCallback].
- Restrictions: Effective after login, invalid after logout. Searching global is not supported in the room scene (conversationType=1).
Return
Callback of the search global local message result.
ReplyMessage
public void ReplyMessage(ZIMMessage message,ZIMMessage toOriginalMessage,ZIMMessageSendConfig config,ZIMMessageSendNotification notification,ZIMMessageSentCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | The message to be sent. Only supports: ZIMTextMessage(1), ZIMImageMessage(11), ZIMFileMessage(12), ZIMAudioMessage(13), ZIMVideoMessage(14), ZIMCombineMessage(100), ZIMCustomMessage(200)." |
| toOriginalMessage | ZIMMessage | The source message to be quoted. Only supports: ZIMTextMessage(1), ZIMImageMessage(11), ZIMFileMessage(12), ZIMAudioMessage(13), ZIMVideoMessage(14), ZIMCombineMessage(100), ZIMCustomMessage(200)." |
| config | ZIMMessageSendConfig | Related configuration for sending messages. |
| notification | ZIMMessageSendNotification | Related notifications when messages are sent. |
| callback | ZIMMessageSentCallback | Callback of the sending result of the message. |
- Related APIs: [queryHistoryMessage], [sendMessage], [sendMediaMessage].
DownloadMediaFile
public abstract void DownloadMediaFile(ZIMMessage message,ZIMMediaFileType fileType,ZIMMediaDownloadConfig config,ZIMMediaDownloadingProgress progress,ZIMMediaDownloadedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | The media file message to download. |
| fileType | ZIMMediaFileType | Media file type. |
| config | ZIMMediaDownloadConfig | Download the configuration object. |
| progress | ZIMMediaDownloadingProgress | Progress callback for downloading media files. |
| callback | ZIMMediaDownloadedCallback | Result callback for downloading media files. |
- Related callbacks: [ZIMMediaDownloadedCallback], [ZIMMediaDownloadingProgress].
- Restrictions: If you download an external URL, you can only download a maximum of 200MB of resources. For configuration, please contact ZEGO technical support.
Return
Result for downloading media files.
DownloadMediaFile
public abstract void DownloadMediaFile(ZIMMediaMessage message,ZIMMediaFileType fileType,ZIMMediaDownloadingProgress progress,ZIMMediaDownloadedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMediaMessage | The media message to download. |
| fileType | ZIMMediaFileType | Media file type. |
| progress | ZIMMediaDownloadingProgress | Progress callback for downloading media files. |
| callback | ZIMMediaDownloadedCallback | Result callback for downloading media files. |
- Related callbacks: [ZIMMediaDownloadedCallback], [ZIMMediaDownloadingProgress].
- Restrictions: If you download an external URL, you can only download a maximum of 200MB of resources. For configuration, please contact ZEGO technical support.
Return
Result for downloading media files.
QueryHistoryMessage
public abstract void QueryHistoryMessage(string conversationID,ZIMConversationType conversationType,ZIMMessageQueryConfig config,ZIMMessageQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | The session ID of the queried historical message. |
| conversationType | ZIMConversationType | conversation type. |
| config | ZIMMessageQueryConfig | Query the configuration of historical messages. |
| callback | ZIMMessageQueriedCallback | Returns the result of querying historical messages. |
- Related callbacks: [ZIMMessageQueriedCallback].
- Restrictions: Effective after login, invalid after logout. In the default room scenario (conversationType=1), offline message is disabled. If you need to enable it, please contact the corresponding technical support.
Return
Callback of the query history message result.
queryPinnedMessageList
public abstract void queryPinnedMessageList(string conversationID,ZIMConversationType conversationType,ZIMMessageQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | The conversation ID of the queried pinned message. |
| conversationType | ZIMConversationType | conversation type. |
| callback | ZIMMessageQueriedCallback | Returns the result of querying historical messages. |
- Related callbacks: [ZIMPinnedMessageListQueriedCallback].
- Restrictions: The SDK must be logged in and the message pinning feature must be supported to use this interface.
Return
Callback of the query pinned message result.
RevokeMessage
public abstract void RevokeMessage(ZIMMessage message,ZIMMessageRevokeConfig config,ZIMMessageRevokedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | The message needs to be revoke. |
| config | ZIMMessageRevokeConfig | Revoke the configuration of the message. |
| callback | ZIMMessageRevokedCallback | Returns the result of revoking the message. |
- Use cases: The user needs to recall a message. This method can be used when the user does not want other users to see the message.
- When to call: Called when the message needs to be revoked.
Room message revoke is not supported.
- Related callbacks: If the revoked message is the latest message of the session, the [OnConversationChanged] callback will be triggered, and if the message is unread, the [OnConversationTotalUnreadMessageCountUpdated] callback will be triggered.
- Restrictions: Login is required to use. To revoke messages from other members within the group, the group owner needs to use version 2.9.0 or above.
Return
Returns the result of revoking the message.
DeleteMessages
public abstract void DeleteMessages(List<ZIMMessage> messageList,string conversationID,ZIMConversationType conversationType,ZIMMessageDeleteConfig config,ZIMMessageDeletedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| messageList | List<ZIMMessage> | List of deleted messages. |
| conversationID | string | The session ID of the deleted message. |
| conversationType | ZIMConversationType | conversation type. |
| config | ZIMMessageDeleteConfig | Delete the configuration of the message. |
| callback | ZIMMessageDeletedCallback | Returns the result of deleting the message. |
- Impacts on other APIs: If the deleted message is the latest message of the session, the [OnConversationChanged] callback will be triggered, and if the message is unread, the [OnConversationTotalUnreadMessageCountUpdated] callback will be triggered.
- Related callbacks: [ZIMMessageDeletedCallback]、[OnConversationChanged]、[OnConversationTotalUnreadMessageCountUpdated].
- Restrictions: Effective after login.
Return
Returns the result of deleting the message.
AddMessageReaction
public abstract void AddMessageReaction(string reactionType,ZIMMessage message,ZIMMessageReactionAddedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| reactionType | string | Type of reaction, defined by you, with a maximum length of 32 bytes. |
| message | ZIMMessage | The message needs reaction. |
| callback | ZIMMessageReactionAddedCallback | Returns the result of adding message reaction. |
- Use cases: Users need to express their position on a certain message, such as liking, and this method can be used to express their position.
Room message reaction is not supported.
- Related callbacks: If the addition is successful, the [OnMessageReactionsChanged] callback will be triggered. If the reaction is made to the latest message in the conversation, the [OnConversationChanged] callback will be triggered when the addition is successful.
- Restrictions: You can only use it after logging in. And only supports message statements for single chat and group chat
Return
Returns the result of adding reaction.
DeleteMessageReaction
public abstract void DeleteMessageReaction(string reactionType,ZIMMessage message,ZIMMessageReactionDeletedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| reactionType | string | Reaction type. It must be the type of reaction made by the local user. |
| message | ZIMMessage | The message needs reaction delete. |
| callback | ZIMMessageReactionDeletedCallback | Returns the result of revoking the message. |
- Use cases: Users need to delete the status of a message that has already been stated, which can be done using this method.
Room message reaction is not supported.
- Related callbacks: If the deletion is successful, the [OnMessageReactionsChanged] callback will be triggered. If the reaction is deleted from the latest message in the conversation, the [OnConversationChanged] callback will be triggered when the deletion is successful.
- Restrictions: You can only use it after logging in. And only supports message statements for single chat and group chat
Return
Returns the result of deleting reaction.
QueryMessageReactionUserList
publicabstract void QueryMessageReactionUserList(ZIMMessage message,ZIMMessageReactionUserQueryConfig config,ZIMMessageReactionUserListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| message | ZIMMessage | The message needs querying reaction user list. |
| config | ZIMMessageReactionUserQueryConfig | reaction user query config. |
| callback | ZIMMessageReactionUserListQueriedCallback | the result of querying reaction user list. |
- Use cases: When it is necessary to obtain specific user information under a certain state of a message, this interface can be called to query state user messages in a paginated manner.
- Restrictions: You can only use it after logging in. And only supports message statements for single chat and group chat
Return
Returns the result of querying reaction user list.
DeleteAllMessage
public abstract Promise<ZIMMessageDeletedResult> DeleteAllMessage(string conversationID,ZIMConversationType conversationType,ZIMMessageDeleteConfig config,ZIMMessageDeletedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| conversationID | string | The session ID of the message to be deleted. |
| conversationType | ZIMConversationType | conversation type. |
| config | ZIMMessageDeleteConfig | delete session configuration. |
| callback | ZIMMessageDeletedCallback | Returns the result of deleting a message by session ID. |
- Impacts on other APIs: The [OnConversationChanged] callback is triggered, and if there are unread messages, the [OnConversationTotalUnreadMessageCountUpdated] callback is triggered.
- Related callbacks: [ZIMMessageDeletedCallback].
- Restrictions: Effective after login, invalid after logout.
The impact of deleting messages is limited to this account, and messages from other accounts will not be deleted.
Return
Returns the result of deleting the message.
UpdateMessageLocalExtendedData
public abstract void UpdateMessageLocalExtendedData(string localExtendedData,ZIMMessage message,ZIMMessageLocalExtendedDataUpdatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| localExtendedData | string | The expandable message field visible only on this end can store additional information locally and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration. |
| message | ZIMMessage | Message body to be updated |
| callback | ZIMMessageLocalExtendedDataUpdatedCallback | Callback function to modify local extension fields. |
Details
After the user logs in, calling this interface allows updating the local expandable field of the message.
- When to call: After the user is logged in.
- Privacy reminder: Please avoid passing sensitive personal information, including but not limited to phone numbers, ID card numbers, passport numbers, real names, etc.
- Related callbacks: [ ZIMMessageLocalExtendedDataUpdatedCallback ].
- Available since: 2.2.0 or above.
Return
The result of the update user extended data.
CreateRoom
public abstract void CreateRoom(ZIMRoomInfo roomInfo,ZIMRoomCreatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomInfo | ZIMRoomInfo | The configuration information of the room to be created. |
| callback | ZIMRoomCreatedCallback | Callback of the result of creating the room. |
Details
Users can create and join rooms through this api, other users can join this room through [JoinRoom] function.
- Use cases: When you need to create a multi-person chat scene, you can create and join a room by this API.
- When to call: It can be called after creating a ZIM instance through [Create].
- Caution: When everyone leaves the room, the room will be automatically destroyed. If the room already exists, an error will occur when calling this API. For details, please refer to the returned error code handling.
- Related callbacks: The result of the room creation can be obtained through the [OnRoomCreated] callback.
- Related APIs: You can join the room through [JoinRoom] and leave the room with [LeaveRoom].
- Available since: 1.1.0 or above.
QueryRoomMembers
public void QueryRoomMembers(List\<string\> userIDs,string roomID,ZIMRoomMembersQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userIDs | List<string> | List of user IDs to query. |
| roomID | string | The room ID of the specified room. |
| callback | ZIMRoomMembersQueriedCallback | Callback for querying room user information. |
Details
This method can query the information of up to ten users in the specified room of the logged-in user.
- Use cases: When you need to know the user information in the specified room, you can call this interface to obtain the data source.
- When to call /Trigger: Can be invoked after login.
- Available since: 2.8.0 and above.
- Restrictions: Available after login, unavailable after logout, up to ten users can be queried at one time.
SetRoomMembersAttributes
public abstract void SetRoomMembersAttributes(Dictionary<string, string> attributes,List\<string> userIDs,string roomID,ZIMRoomMemberAttributesSetConfig config,ZIMRoomMembersAttributesOperatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| attributes | Dictionary<string, string> | Room member attributes to be set. |
| userIDs | List<string> | A list of userIDs to set. |
| roomID | string | Room ID. |
| config | ZIMRoomMemberAttributesSetConfig | Behavior configuration of the operation. |
| callback | ZIMRoomMembersAttributesOperatedCallback | Action callback for setting room members attributes. |
Details
Supported Versions: 2.4.0 and above.
Detail description: Call this API to set room user properties of members in the room.
Business scenario: If you need to set a level for members in the room, you can use this interface to set a state.
Default: [ZIMRoomMemberAttributesSetConfig] Default constructor isDeleteAfterOwnerLeft is true.
Call timing: After logging in and calling in the relevant room.
Usage limit: A maximum of 500 user attributes can be set in each room and stored in the key-value mode. If you need to increase the attribute limit, please contact ZEGO technical support. The total length of user attribute key-values owned by each user in a room cannot exceed 144 bytes, and the number of key-values cannot exceed 30 pairs. The length of a single key-value cannot exceed 8 bytes for a Key and 64 bytes for a Value. If you need to raise the cap, please contact ZEGO technical support. After the room is destroyed, the user-defined user properties are also destroyed.
Relevant callbacks: [ZIMRoomMembersAttributesOperatedCallback],[OnRoomMemberAttributesUpdated].
Related interfaces: [QueryRoomMembersAttributes], [QueryRoomMemberAttributesList].
Return
Operation result for setting room members attributes.
QueryRoomMembersAttributes
public void QueryRoomMembersAttributes(List\<string> userIDs,string roomID,ZIMRoomMembersAttributesQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| userIDs | List<string> | A list of userIDs to query. |
| roomID | string | Room ID. |
| callback | ZIMRoomMembersAttributesQueriedCallback | Callback for the result of batch query of room user attributes. |
Details
Call this API to batch query the room user attributes of the members in the room.
- Use cases: Use this interface when you need to specify that you want to query some room users.
- Related callbacks: [ZIMRoomMembersAttributesQueriedCallback].
- Related APIs: [SetRoomMembersAttributes]、[QueryRoomMemberAttributesList].
- Runtime lifecycle: It is available after logging in and joining the corresponding room, but unavailable after leaving the corresponding room.
- Available since: 2.4.0 or later.
- Restrictions: The maximum call frequency is 5 times within 30 seconds by default, and the maximum query time is 100 people.
Return
The result of batch query of room user attributes.
QueryRoomMemberAttributesList
public abstract void QueryRoomMemberAttributesList(string roomID,ZIMRoomMemberAttributesQueryConfig config,ZIMRoomMemberAttributesListQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | Room ID. |
| config | ZIMRoomMemberAttributesQueryConfig | Behavior configuration of the operation. |
| callback | ZIMRoomMemberAttributesListQueriedCallback | Result callback for querying member attributes in the room. |
Details
paginate the room user properties that have room property members in the room.
- Use cases: This interface is used when you need to query all room users.
- Related callbacks: [ZIMRoomMemberAttributesListQueriedCallback].
- Related APIs: [SetRoomMembersAttributes]、[QueryRoomMembersAttributes].
- Runtime lifecycle: It is available after logging in and joining the corresponding room, but unavailable after leaving the corresponding room.
- Available since: 2.4.0 or later.
- Restrictions: The maximum call frequency is 5 times within 30 seconds by default, and the maximum query time is 100 people.
Return
Result of paging query for room user properties.
CreateRoom
public abstract void CreateRoom(ZIMRoomInfo roomInfo,ZIMRoomAdvancedConfig config,ZIMRoomCreatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomInfo | ZIMRoomInfo | The configuration information of the room to be created. |
| config | ZIMRoomAdvancedConfig | The advanced properties of the room to be created. |
| callback | ZIMRoomCreatedCallback | Callback of the result of creating the room. |
Details
Users can create and join rooms through this api, other users can join this room through [joinRoom] function.
- Available since: 1.3.0.
Return
Callback of the result of creating the room.
EnterRoom
public abstract void EnterRoom(ZIMRoomInfo roomInfo,ZIMRoomAdvancedConfig config,ZIMRoomEnteredCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomInfo | ZIMRoomInfo | Configuration information for the room that will be created. Only the first user who enters the room creates roomName and takes effect. |
| config | ZIMRoomAdvancedConfig | Advanced properties of the room that will be created. Only the first user who enters the room is configured to take effect. |
| callback | ZIMRoomEnteredCallback | Callback of the result of entering the room. |
- When to call: It can be called after logging in.
When everyone leaves the room, the room will be automatically destroyed, and a user can be in a maximum of 5 rooms at the same time. [enterRoom] is equivalent to [createRoom] and [joinRoom], so you only need to choose one of the APIs.
- Related callbacks: The result of entering the room can be obtained through the [onRoomEntered] callback.
- Related APIs: You can enter the room through [enterRoom], and leave the room through [leaveRoom].
Return
Callback of the result of entering the room.
JoinRoom
public abstract void JoinRoom(string roomID,ZIMRoomJoinedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | ID of the room to join. |
| callback | ZIMRoomJoinedCallback | Callback of the result of joining the room. |
Details
If the room does not exist, the join fails and you need to call [CreateRoom] to create the room first.
- Use cases: In a multi-person chat scenario, users can call this interface to enter the room when they need to join the room.
- When to call: It can be called after creating a ZIM instance through [create].
- Caution: When everyone leaves the room, the room will be automatically destroyed.
- Related callbacks: The result of joining the room can be obtained through the [ZIMRoomJoinedCallback] callback.
- Related APIs: You can create a room with [CreateRoom] and leave the room with [LeaveRoom].
- Available since: 1.1.0 or above.
Return
Callback of the result of joining the room
LeaveRoom
public abstract void LeaveRoom(string roomID,ZIMRoomLeftCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | ID of the room to leave. |
| callback | ZIMRoomLeftCallback | Callback of the result of leave the room. |
Details
When the user in the room needs to leave the room, use [LeaveRoom] to leave the room. If the room does not exist, the leave fails.
- Use cases: In the multi-person chat scenario, when users in the room need to leave the room, they can leave the room through this interface.
- When to call: After creating a ZIM instance via [create], it can be called when the user is in the room.
- Caution: If the current user is not in this room, the exit fails. When everyone leaves the room, the room will be automatically destroyed.
- Related callbacks: The result of leaving the room can be obtained through the [ZIMRoomLeftCallback] callback.
- Related APIs: You can create a room through [CreateRoom] and join a room with [JoinRoom].
- Available since: 1.1.0 or above.
Return
Callback of the result of leave the room.
QueryRoomMemberList
public abstract void QueryRoomMemberList(string roomID,ZIMRoomMemberQueryConfig config,ZIMRoomMemberQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | ID of the room to query. |
| config | ZIMRoomMemberQueryConfig | Configuration of query room member operation. |
| callback | ZIMRoomMemberQueriedCallback | Callback for the result of querying room members list. |
Details
After joining a room, you can use this function to get the list of members in the room.
- Use cases: When a developer needs to obtain a list of room members for other business operations, this interface can be called to obtain a list of members.
- When to call: After creating a ZIM instance through [Create], and the user is in the room that needs to be queried, you can call this interface.
- Caution: To use this feature, please contact ZEGOCLOUD technical support. If the user is not currently in this room, the query fails. When there are more than 500 room members, the result of querying the list of room members can only contain the information of a maximum of 500 members.
- Related callbacks: Through the [ZIMRoomMemberQueriedCallback] callback, you can get the result of querying the room member list.
- Related APIs: You can check the online number of people in the room through [QueryRoomOnlineMemberCount].
- Available since: 1.1.0 or above.
Return
Callback for the result of querying room members list.
QueryRoomOnlineMemberCount
public abstract void QueryRoomOnlineMemberCount(string roomID,ZIMRoomOnlineMemberCountQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | ID of the room to query. |
| callback | ZIMRoomOnlineMemberCountQueriedCallback | Callback for the result of querying room online members count. |
Details
After joining a room, you can use this function to get the number of online members in the room.
- Use cases: When a developer needs to obtain the number of room members who are online, this interface can be called.
Calling time: After creating a ZIM instance through [Create], and the user is in the room that needs to be queried, this interface can be called.
- Caution: If the user is not currently in this room, the query will fail.
- Related callbacks: The result of querying the online number of room members can be obtained through the [ZIMRoomOnlineMemberCountQueriedCallback] callback.
- Related APIs: the room member can be inquired through [QueryRoomMember].
- Available since: 1.1.0 or above.
Return
Callback for the result of querying room online members count.
QueryRoomAllAttributes
public abstract void QueryRoomAllAttributes(string roomID,ZIMRoomAttributesQueriedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | Need to query the room number of the custom attributes. |
| callback | ZIMRoomAttributesQueriedCallback | Callback for querying room attributes. |
Details
Used to query room attributes.
- Available since: 1.3.0.
Return
Callback for querying room attributes.
SetRoomAttributes
public abstract void SetRoomAttributes(Dictionary<string, string> roomAttributes,string roomID,ZIMRoomAttributesSetConfig config,ZIMRoomAttributesOperatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomAttributes | Dictionary<string, string> | Room attributes to be set. |
| roomID | string | To modify the room number of the room attribute. |
| config | ZIMRoomAttributesSetConfig | Behavior configuration of the operation. |
| callback | ZIMRoomAttributesOperatedCallback | Operation callback for setting room properties. |
Details
Used to set room properties.
- Use cases: This interface is used when you need to set the mic bit in a chat room.
- When to call /Trigger: after login, and in the relevant room to call.
- Default value: [ZIMRoomAttributesSetConfig] the space-time of the default configuration is optional, and do not update the owner, and involves the room properties in the owner is not automatically deleted after exit.
- Privacy reminder: Try not to introduce sensitive information related to personal privacy into the property of the room, including but not limited to mobile phone number, ID number, passport number, real name, etc.
Privacy reminder: Adds or modifies room properties to an existing room.
- Related callbacks: [ZIMRoomAttributesOperatedCallback].
- Related APIs: [DeleteRoomAttributes] to delete room attributes. [QueryRoomAllAttributes], queries the room attributes.
- Available since: 1.3.0.
- Restrictions: You can set a maximum of 20 properties per room.
Notice: Key-value of the room property. The default key length is 16 and the default value length is 1024.
Return
Operation callback for setting room properties.
DeleteRoomAttributes
public abstract void DeleteRoomAttributes(List\<string> keys,string roomID,ZIMRoomAttributesDeleteConfig config,ZIMRoomAttributesOperatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| keys | List<string> | The key of the room attribute to be deleted. |
| roomID | string | To modify the room number of the room attribute |
| config | ZIMRoomAttributesDeleteConfig | Behavior configuration of the operation. |
| callback | ZIMRoomAttributesOperatedCallback | Operation callback for setting room properties. |
Details
Used to delete room attributes.
- Available since: 1.3.0.
Return
Operation callback for setting room properties.
BeginRoomAttributesBatchOperation
public abstract void BeginRoomAttributesBatchOperation(string roomID,ZIMRoomAttributesBatchOperationConfig config)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | The number of the room where the combined operation needs to be turned on. |
| config | ZIMRoomAttributesBatchOperationConfig | The configuration of the combined operation. |
Details
Used to turn on the combination of room attributes.
- Available since: 1.3.0.
EndRoomAttributesBatchOperation
public abstract void EndRoomAttributesBatchOperation(string roomID,ZIMRoomAttributesBatchOperatedCallback callback)ZIM.csParameters
| Name | Type | Description |
|---|---|---|
| roomID | string | To modify the room number of the room attribute. |
| callback | ZIMRoomAttributesBatchOperatedCallback | Callback for combined operation. |
Details
After completing the operation of combining room attributes, all the setting/deleting operations from the last call to beginRoomAttributesBatchOperation to this operation will be completed for the room.
- Available since: 1.3.0.
Return
Callback for combined operation.
ZIMAudioMessage
Audio message object.
Details
Identifies the basic parameters of a message.
- Caution: If the Type parameter of the base class is Audio during callback, you can force the base class message object to be of this type.
Declared in ZIMDefines.cs
Properties
audioDuration
public ulong audioDuration- Required: Required by the sender, if not filled, the audio message will fail to be sent When sending local audio messages.
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileUID
public string fileUIDDetail description: The unique ID of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMAudioMessageLiteInfo
Audio message lite info object.
Details
Identifies the basic parameters of a audio message.
Declared in ZIMDefines.cs
Properties
audioDuration
public ulong audioDuration- Required: Required by the sender, if not filled, the audio message will fail to be sent When sending local audio messages.
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
ZIMCacheConfig
Cache configuration
Details
Configure the storage path of cache files (such as chat records).
Declared in ZIMDefines.cs
Properties
cachePath
public string cachePathThe storage path of the cache files. Refer to the official website document for the default path.
ZIMCallAcceptConfig
Behavior property set by accepting a call invitation.
Details
Behavior property set by accepting a call invitation.
Declared in ZIMDefines.cs
Properties
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
- Required: Required.
ZIMCallCancelConfig
Behavior property that cancels the call invitation setting.
Details
Behavior property that cancels the call invitation setting.
Declared in ZIMDefines.cs
Properties
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
- Required: not required.
- Default value: "".
pushConfig
ZIMCallEndConfig
End the behavior attribute of the call invitation setting.
Details
End the behavior attribute of the call invitation setting.
Declared in ZIMDefines.cs
Properties
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
- Required: not required.
pushConfig
ZIMCallInfo
Call invitation information.
Details
Call invitation information.
Declared in ZIMDefines.cs
Properties
callID
public string callIDCall invite ID.
caller
public string callerCall invitation initiator ID.
mode
state
extendedData
public string extendedDataCreate a call invitation additional information.
createTime
public number createTimeCall invites to create a timestamp.
endTime
public number endTimeCall invitation end time.
callUserList
ZIMCallInvitationAcceptedInfo
Accept the call invitation message.
Details
Accept the call invitation message.
Declared in ZIMDefines.cs
Properties
invitee
public string inviteeInvitee ID.
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
ZIMCallInvitationCancelledInfo
Cancel the call invitation message.
Details
Cancel the call invitation message.
Declared in ZIMDefines.cs
Properties
inviter
public string inviterThe inviter ID of the call invitation.
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
ZIMCallInvitationCreatedInfo
Information to created the call invitation.
Details
Information to created the call invitation.
Declared in ZIMDefines.cs
Properties
timeout
public int timeoutThe timeout setting of the call invitation, the unit is seconds.
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
mode
caller
public string callerThe creator of the call invitation is the same as the userID that calls callInvite.
createTime
public long createTimeThe event stamp when the call invitation was created on the server, accurate to milliseconds.
callUserList
ZIMCallInvitationQueryConfig
Inquiry the setting attribute of the call invitation list
Details
Inquiry the setting attribute of the call invitation list
Declared in ZIMDefines.cs
Properties
count
public number countThe query number is limited to up to 100.
- Required: required.
nextFlag
public number nextFlagThe flag of the query list.No padding is required for the first query. After the query, callback will return a nextFlag, which can be filled in the next query to continue the query based on the last query.
- Required: not required.
ZIMCallInvitationReceivedInfo
Information to accept the call invitation.
Details
Information to accept the call invitation.
Declared in ZIMDefines.cs
Properties
timeout
public int timeoutThe timeout setting of the call invitation, the unit is seconds.
inviter
public string inviterInviter ID.
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
mode
caller
public string callerThe creator of the call invitation is the same as the userID that calls callInvite.
createTime
public long createTimeThe event stamp when the call invitation was created on the server, accurate to milliseconds.
callUserList
ZIMCallInvitationRejectedInfo
Reject the call invitation message.
Details
Reject the call invitation message.
Declared in ZIMDefines.cs
Properties
invitee
public string inviteeInvitee ID.
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
ZIMCallInvitationSentInfo
Call invitation sent message.
Details
Call invitation sent message.
Declared in ZIMDefines.cs
Properties
timeout
public int timeoutThe timeout setting of the call invitation, the unit is seconds.
errorInvitees
public ArrayList<ZIMCallUserInfo> errorInviteesUser id that has not received a call invitation.
errorUserList
public List<ZIMErrorUserInfo> errorUserListUser id that has not received a call invitation list.
ZIMCallInviteConfig
The behavior property of the Send Call Invitation setting.
Details
The behavior property of the Send Call Invitation setting.
Declared in ZIMDefines.cs
Properties
timeout
public uint timeoutThe timeout setting of the call invitation, the unit is seconds. The range is [1, 600].
- Required: not required.
Default: 90.
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
pushConfig
mode
public ZIMCallInvitationMode modeCall invitation mode configuration. Supported Version: 2.9.0 or later.
- Required: required. default:GENERAL
enableNotReceivedCheck
public bool enableNotReceivedCheckIf the pass value is true, the system checks whether the call invitation is delivered in this call and subsequent calls.
- Use cases: After the calling party sends a call invitation, if the called party does not receive the invitation within 5 seconds (3 or 4 seconds can be configured for technical support) because the user is disconnected or not online, the user status changes to notYetReceived. You can use this state flow to indicate to the user that the user may not be online. If the called party goes online before the call times out, the status changes to received received.
- Required: This is not required.
- Default value: false
- Recommended value: This property takes effect in version 2.15.0 and later, when the new version sends an invitation to a call with delivery detection turned on to the old version, which will continue to display the inviting status instead of notYetReceived.
ZIMCallJoinConfig
Add the behavior attribute of the call invitation setting.
Details
Add the behavior attribute of the call invitation setting.
Declared in ZIMDefines.cs
Properties
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
ZIMCallQuitConfig
Behavior property set by quit a call invitation.
Details
Behavior property set by quit a call invitation.
Declared in ZIMDefines.cs
Properties
extendedData
public string extendedDataExtended field, through which the inviter can carry information to the invitee.
- Required: Required.
pushConfig
ZIMCallRejectConfig
This parameter is used to set the configuration item of call invitation rejection.
Details
This command is used to customize the call invitation when sending invitation rejection.
- Use cases: You need to pass the configuration item to the interface when invoking the call rejection invitation.
Declared in ZIMDefines.cs
Properties
extendedData
public string extendedDataAdditional fields for attaching custom content when sending a reject invitation.
- Use cases: When the user needs to refuse to send some custom content to the inviter.
- Required: Required.
- Default value: "".
ZIMCallUserInfo
Call invitation user information.
Details
Call invitation user information.
Declared in ZIMDefines.cs
Properties
userID
public string userIDUser ID, a string with a maximum length of 32 bytes or less. It is customized by the developer. Only support numbers, English characters and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'.
state
extendedData
public string extendedDataCall the additional information in user information.
ZIMCallingInviteConfig
Behavior property set by quit a call invitation.
Details
Behavior property set by quit a call invitation.
Declared in ZIMDefines.cs
Properties
pushConfig
ZIMCombineMessage
Base class for combine message objects.
- Available since: 2.14.0 and above.
Declared in ZIMDefines.cs
Properties
title
public string titleThe title of combine message
summary
public string summaryThe summary of combine message
combineID
public string combineIDCombine ID, internal user
messageList
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMCombineMessageLiteInfo
Base class for combine message lite info objects.
Details
Detail description: Identifies a combine message.
Declared in ZIMDefines.cs
Properties
title
public string titleThe title of combine message
summary
public string summaryThe summary of combine message
ZIMCommandMessage
Custom binary message object.
Details
Identifies a binary message.
- Caution: If the Type parameter of the base class is Custom during callback, you can force the base class message object to be of this type.
Declared in ZIMDefines.cs
Properties
message
public char * messageThe content of the custom message.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
Methods
ZIMCommandMessage
ZIMConversation
Session specific content.
Details
The specific content of the session.
Declared in ZIMDefines.cs
Properties
conversationID
public string conversationIDconversationID.
conversationName
public string conversationNameconversationName is the same as the groupName/userName value corresponding to the session.
type
unreadMessageCount
public int unreadMessageCountSession unread.
lastMessage
orderKey
public long orderKeyOrderKey is used to describe the order of messages in the session. The larger orderKey is, the newer it is.
notificationStatus
public ZIMConversationNotificationStatus notificationStatussession notification status.
conversationAvatarUrl
public string conversationAvatarUrlDetail description: Conversation avatar URL. The peer to peer chat conversation avatar URL is the same as the user avatar URL, and the group chat conversation avatar URL is the same as the group avatar URL.
Use Limit: the maximum number of characters is 500 bytes. There is no limit on special characters.
isPinned
public bool isPinnedWhether the conversation is pinned.
mentionedInfoList
public ArrayList<ZIMMessageMentionedInfo> mentionedInfoListWhen reminded in a message or reminded to everyone in a conversation, this array will record the reminders.
- Use cases: For example, you can display the number of reminders in the conversation list based on this array, and also display which user's reminder it is.
conversationAlias
public string conversationAliasAfter the friend remarks are set through [updateFriendAlias], this parameter is changed for each chat conversation. After setting a group alias by [updateGroupAlias], the corresponding group chat conversation's parameter will be modified synchronously.
- Use cases: After update alias for friends or groups, the corresponding conversation chooses to display the alias over the conversation name when rendering the conversation page.
marks
public std::vector\<int> marksDescribes all the existing marks for the conversation.
- Use cases: The business layer can group logic, etc., according to different conversations with different marks.
draft
public string draftConversation draft, when draft set conversation will carry this parameter.
ZIMConversationChangeInfo
Session change information.
Details
Contains information after session changes.
Declared in ZIMDefines.cs
Properties
event
conversation
ZIMConversationDeleteConfig
Delete session configuration.
Details
Delete the related configuration of the session.
Declared in ZIMDefines.cs
Properties
isAlsoDeleteServerConversation
public bool isAlsoDeleteServerConversationWhether to delete the conversation on the server
- Required: not required.
- Default value: true.
ZIMConversationQueryConfig
Query the relevant configuration of the session.
Details
Configurable information when querying a session.
Declared in ZIMDefines.cs
Properties
nextConversation
public ZIMConversation nextConversationSession that needs to be queried.
- Required: Not required.
count
public uint countThe number of sessions to query.
- Required: Required.
ZIMConversationSearchConfig
Conversation search configuration.
Details
Conversation search configuration.
Declared in ZIMDefines.cs
Properties
nextFlag
public int nextFlagPagination token, fill in 0 initially, and then fill in the nextFlag returned from the callback to retrieve data for the next page.
totalConversationCount
public int totalConversationCountThe number of messages that can be retrieved in one search. It is recommended to be less than 20 to reduce performance overhead.
- Required: Required.
conversationMessageCount
public int conversationMessageCountThe number of local messages that can be retrieved for a single conversation in one search. It is recommended to be less than 10 to reduce performance overhead.
keywords
public List\<string> keywordsSearch keywords, supports up to 5. Otherwise, an error will occur. For example, if you pass in "1" and "2", the search results will only display conversations that contain both "1" and "2" keywords in the messages.
messageTypes
public List<ZIMMessageType> messageTypesMessage types, can be used to specify message types. Support passing in multiple types.
subMessageTypes
public List\<int> subMessageTypesThe subtypes of custom messages have a value range of [0,200]. Developers can use this range to search for specific custom types.
senderUserIDs
public List\<string> senderUserIDsSend user ID, supports up to 5. For example, if you pass in "zego2023", the search results will only display conversations where messages have been sent by the user "zego2023".
startTime
public long startTimeThe starting point of the search, in milliseconds, with a default value of 0. The format is UTC timestamp.
endTime
public long endTimeThe ending point of the search, which must be greater than the startTime, in milliseconds. The default value is 0 and the format is UTC timestamp.
ZIMConversationSearchInfo
Conversations search info.
Declared in ZIMDefines.cs
Properties
conversationID
public string conversationIDThe conversation ID of the local message to be search.
conversationType
totalMessageCount
public int totalMessageCountTotal message count
messageList
ZIMCustomMessage
Custom message object.
Details
Identifies a custom message.
- Caution: When calling back, if the Type parameter of the base class is Custom, the base class message object can be forcibly converted to this class.
- Available since: 2.8.0 and above.
Declared in ZIMDefines.cs
Properties
message
public string messageThe text content of the message.
subType
public uint subTypeThe subtype of the message, which is used by customers to customize the usage of different custom messages.
- Required: The sender is required, otherwise the message will fail to be sent.
searchedContent
public string searchedContentSearch fields for custom messages. Since you cannot search for a custom message by directly searching the message field, you can concatenate the content you want to be searched in the custom message (such as the title of the poll, etc.) and put it in this parameter (the length is 64 bytes by default), so that follow-up search.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMCustomMessageLiteInfo
Custom message lite info object.
Details
Identifies a custom message.
Declared in ZIMDefines.cs
Properties
message
public string messageThe text content of the message.
subType
public uint subTypeThe subtype of the message, which is used by customers to customize the usage of different custom messages.
- Required: The sender is required, otherwise the message will fail to be sent.
searchedContent
public string searchedContentSearch fields for custom messages. Since you cannot search for a custom message by directly searching the message field, you can concatenate the content you want to be searched in the custom message (such as the title of the poll, etc.) and put it in this parameter (the length is 64 bytes by default), so that follow-up search.
ZIMError
Error infomation
Details
Error infomation.
Declared in ZIMDefines.cs
Properties
code
public ZIMErrorCode codeThe storage path of the log files. Refer to the official website document for the default path.
message
public string messageError infomation description.
ZIMEventHandler
Details
Callback.
Declared in ZIMEventHandler.cs
Methods
OnError
ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| errorInfo | ZIMError | Error information, please refer to the error codes document. |
Details
When an EXCEPTION occurs in the SDK, the callback prompts detailed exception information.
- Use cases: It is recommended that developers listen for this callback notification and print the error information to the console during debugging after accessing the SDK, so that they can learn about the errors occurred during development and modify them in time.
- When to call: When an error occurs within the SDK, the SDK notifies the developer through this function callback.
- Available since: 1.1.0 or above.
OnConnectionStateChanged
public delegate void OnConnectionStateChanged(ZIM zim,ZIMConnectionState state,ZIMConnectionEvent event,Dictionary\<string, string> extendedData)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| state | ZIMConnectionState | The current connection state after changed. |
| event | ZIMConnectionEvent | The event that caused the connection state to change. |
| extendedData | Dictionary<string, string> | Extra information when the event occurs, a standard JSON format data. |
Details
When the connection status changes, the user will be notified of the current status and events through this callback.
- Use cases: The [ZIMConnectionState] and [ZIMConnectionEvent] in this callback can be used to accomplish different business logic when you need to monitor the connection state and the events that cause the connection state to change.
- When to call: This function is called back when connection state changes.
- Available since: 1.1.0 or above.
OnTokenWillExpire
public delegate void OnTokenWillExpire(ZIM zim,uint second)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| second | uint | The remaining second before the token expires, the unit is seconds. |
Details
When receiving this callback, the developer should call the [RenewToken] function to update the Token in time.
- Use cases: When the authentication Token has only 30 seconds left, the SDK calls back this function to notify the developer to update the authentication Token. If the validity period of the authentication Token passed by the developer when [Login] is less than 30 seconds, the authentication Token will be recalled after [Login] is successful.
- When to call: For details, see authentication Token Generation https://doc-zh.zego.im/article/11617.
- Available since: 1.1.0 or above.
OnUserInfoUpdated
public delegate void OnUserInfoUpdated(ZIM zim,ZIMUserFullInfo info)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMUserFullInfo | Updated user information. |
Details
In the multi-terminal login scenario, after the user modifies their information on device A, other online multi-terminal devices will receive this callback. For offline devices, after the user goes online, they need to call the [QueryUsersInfo] interface to actively query user information.
- Available since: 2.11.0 or above.
OnUserRuleUpdated
public delegate void OnUserRuleUpdated(ZIM zim,ZIMSelfUserRule userRule)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| userRule | ZIMSelfUserRule | Updated user rule information. |
Details
Callback of user rule changes.
When to
- Trigger: When the user rule of the current user is changed, all users are notified by the callback.
- Available since: 2.15.0 and later versions.
OnCallInvitationReceived
public delegate void OnCallInvitationReceived(ZIM zim,ZIMCallInvitationReceivedInfo info,string callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallInvitationReceivedInfo | Information about received call invitations. |
| callID | string | Received CallID. |
- When to call: After creating a ZIM instance through [create].
If the user is not in the invitation list or not online, this callback will not be called.
- Related APIs: [callInvite].
OnCallInvitationCreated
public delegate void OnCallInvitationCreated(ZIM zim,ZIMCallInvitationCreatedInfo info,string callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallInvitationCreatedInfo | Information about created call invitations. |
| callID | string | Created CallID. |
- When to call: After creating a ZIM instance through [create].
If the user is not in the invitation list or not online, this callback will not be called.
- Related APIs: [callInvite].
OnCallInvitationCancelled
public delegate void OnCallInvitationCancelled(ZIM zim,ZIMCallInvitationCancelledInfo info,string callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallInvitationCancelledInfo | Information about canceled call invitations. |
| callID | string | Cancelled callID. |
- When to call: After creating a ZIM instance through [Create].
If the user is not in the cancel invitation list or is offline, this callback will not be called.
- Related APIs: [CallCancel].
OnCallInvitationTimeout
public delegate void OnCallInvitationTimeout(ZIM zim,ZIMCallInvitationTimeoutInfo info,string callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallInvitationTimeoutInfo | Information class about timeout notifications. |
| callID | string | The callID of the timeout. |
- When to call: After creating a ZIM instance through [create].
If the user is not on the invitation list or is not online, the callback will not be received.
- Related APIs: [CallInvite], [CallAccept], [CallReject].
OnCallInvitationAccepted
public delegate void OnCallInvitationAccepted(ZIM zim,ZIMCallInvitationAcceptedInfo info,string callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallInvitationAcceptedInfo | Information about the call invitation. |
| callID | string | The accepted callID. |
- When to call: After creating a ZIM instance through [create].
This callback will not be called if the user is not online.
- Related APIs: [CallAccept].
OnCallInvitationRejected
public delegate void OnCallInvitationRejected(ZIM zim,ZIMCallInvitationAcceptedInfo info,string callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallInvitationAcceptedInfo | Information about rejected call invitations. |
| callID | string | The callID of the rejected call invitation. |
Details
This callback will be received when the inviter is online after the inviter rejects the call invitation.
- Use cases: The inviter will receive this callback after the inviter declines the call invitation.
- Default value: After creating a ZIM instance through [Create] and logging in.
- When to call /Trigger: After creating a ZIM instance through [Create] and logging in.
- Related APIs: [CallReject].
- Available since: 2.0.0 and above.
- Restrictions: If the user is not the inviter of the call invitation or is not online, the callback will not be received.
OnCallInviteesAnsweredTimeout
public delegate void OnCallInviteesAnsweredTimeout(ZIM zim,List\<string> invitees)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| invitees | List<string> | Timeout invitee ID. |
- When to call: After creating a ZIM instance through [Create].
If the user is not the inviter who initiated this call invitation or is not online, the callback will not be received.
- Related APIs: [CallInvite], [CallAccept], [CallReject].
OnCallInvitationEnded
public delegate void OnCallInvitationEnded(ZIM zim,ZIMCallInvitationEndedInfo info,string callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallInvitationEndedInfo | Information carried by the event callback. |
| callID | string | Timeout invitee ID. |
- Related APIs: [CallEnd]
OnCallUserStateChanged
public delegate void OnCallUserStateChanged(ZIM zim,ZIMCallUserStateChangeInfo info,List\<string> callID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMCallUserStateChangeInfo | Information about the status change of a call member. |
| callID | List<string> | Unique identifier of the call. |
- When to call: When a new member is invited to a call, or a member accepts, rejects, exits, or a member response times out, all users on the current call invitation whose status is "Inviting," "Accepted," and "Received" receive the callback here. If the member is not online at the time of notification, the call is still ongoing when the login succeeds. The status changes of all members during the offline period will be sent to the user at one time.
If the user is not the inviter who initiated this call invitation or is not online, the callback will not be received.
- Related APIs: [CallInvite], [CallingInvite], [CallAccept], [CallReject],[CallQuit].
OnGroupStateChanged
public delegate void OnGroupStateChanged(ZIM zim,ZIMGroupState state,ZIMGroupEvent event,ZIMGroupOperatedInfo operatedInfo,ZIMGroupFullInfo groupInfo)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| state | ZIMGroupState | The status of the group after the change. |
| event | ZIMGroupEvent | Group related events. |
| operatedInfo | ZIMGroupOperatedInfo | Group information that has been operated. |
| groupInfo | ZIMGroupFullInfo | Information about group status changes. |
Details
allback notification of group status change.
- Use cases: Scenarios that require interaction based on the group status.
- When to call /Trigger: A notification is triggered when a group is created, joined, left, or dismissed.
- Related APIs: [CreateGroup] : creates a group. [JoinGroup] : joins a group. [LeaveGroup], leave the group. [DismissGroup]; dismiss the group.
OnGroupNameUpdated
public delegate void OnGroupNameUpdated(ZIM zim,string groupName,ZIMGroupOperatedInfo operatedInfo,string groupID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| groupName | string | The updated group name. |
| operatedInfo | ZIMGroupOperatedInfo | Operation information after the group name is updated. |
| groupID | string | The groupID where the group name update occurred. |
Details
Group name change notification callback.
- Use cases: If the group name is changed, you need to synchronize the latest group name.
- When to call /Trigger: The group name is changed. Procedure
- Related APIs: [UpdateGroupName] : updates the group name.
OnGroupAvatarUrlUpdated
public delegate void OnGroupAvatarUrlUpdated(ZIM zim,string groupAvatarUrl,ZIMGroupOperatedInfo operatedInfo,string groupID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| groupAvatarUrl | string | The updated group avatar URL. |
| operatedInfo | ZIMGroupOperatedInfo | The operation information after the group avatar URL is updated. |
| groupID | string | The groupID where the group name update occurred. |
- Related APIs: [UpdateGroupAvatarUrl], update group avatar URL.
OnGroupNoticeUpdated
public delegate void OnGroupNoticeUpdated(ZIM zim,string groupNotice,string operatedInfo,string groupID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| groupNotice | string | Updated group announcement. |
| operatedInfo | string | The group announces the updated operation information. |
| groupID | string | The groupID where the group announcement update occurred. |
Details
Group bulletin Change notification callback.
- Use cases: If a group bulletin changes, you need to synchronize the latest bulletin content.
- When to call /Trigger: The group bulletin is changed. Procedure
- Related APIs: [UpdateGroupNotice], which updates the group notice.
OnGroupAttributesUpdated
public delegate void OnGroupAttributesUpdated(ZIM zim,List<ZIMGroupAttributesUpdateInfo> infos,ZIMGroupOperatedInfo operatedInfo,string groupID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| infos | List<ZIMGroupAttributesUpdateInfo> | Information after group attribute update. |
| operatedInfo | ZIMGroupOperatedInfo | Operation information after the group attribute is updated. |
| groupID | string | The groupID for sending group attribute updates. |
Details
Group attribute change notification callback.
- Use cases: When group attributes are changed, you need to synchronize the latest group attributes.
- When to call /Trigger: Triggered when group properties are set, updated, or deleted.
- Related APIs: [SetGroupAttributes] updates group attributes. [DeleteGroupAttributes], delete the group attribute.
OnGroupMemberStateChanged
public void OnGroupMemberStateChanged(ZIM zim,ZIMGroupMemberState state,ZIMGroupMemberEvent event,List<ZIMGroupMemberInfo> userList,ZIMGroupOperatedInfo operatedInfo,string groupID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| state | ZIMGroupMemberState | Updated membership status. |
| event | ZIMGroupMemberEvent | Updated member events. |
| userList | List<ZIMGroupMemberInfo> | Updated member information. |
| operatedInfo | ZIMGroupOperatedInfo | Updated operational information. |
| groupID | string | The groupID where the member state change occurred. |
Details
Group member status change notification callback.
- Use cases: Scenarios that require interaction based on group member states.
- When to call /Trigger: Notification is triggered when a group is created, joined, left, or dismissed, or a user is invited to join or kicked out of the group.
- Related APIs: [CreateGroup], creates a group. [JoinGroup], joins a group. [LeaveGroup], leave the group. [DismissGroup], dismiss the group. [IntiveUsersIntoGroup], which invites users to join the group. [KickGroupMembers], kicks the user out of the group.
OnGroupMemberInfoUpdated
public delegate void OnGroupMemberInfoUpdated(ZIM zim,List<ZIMGroupMemberInfo> groupMemberInfos,ZIMGroupOperatedInfo operatedInfo,string groupID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| groupMemberInfos | List<ZIMGroupMemberInfo> | Updated member information. |
| operatedInfo | ZIMGroupOperatedInfo | Updated operational information. |
| groupID | string | The groupID where the group member information has been changed. |
Details
Return the operation result of changing group member information.
- Use cases: After the basic information of group members is changed, you need to display or interact with group members on the page.
- When to call /Trigger: The result is displayed after the group member information is changed.
- Related APIs: [SetGroupMemberNickname], updates the nickname of a group member. [SetGroupMemberRole], updates the group member role. [TransferGroupOwner], group master transfer.
OnConversationChanged
public delegate void OnConversationChanged(ZIM zim,List<ZIMConversationChangeInfo> conversationChangeInfoList)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| conversationChangeInfoList | List<ZIMConversationChangeInfo> | Changed information about the conversation. |
Details
Trigger this callback to return notification of session updates when a session is added, deleted, modified, pinned or unpinned.
- When to call /Trigger: Notifications are triggered when a new message is updated in the session, or when the session itself is added, deleted, or modified.
- Caution: ConversationID is the same as single chat toUserID and group chat GroupID.
- Related APIs: Triggered by [SendPeerMessage], [SendGroupMessage], [SendRoomMessage], [DeleteConversation], [DeleteMessage], [DeleteMessageByConversationID], [UpdateConversationPinnedState] .
- Available since: 2.0.0 and above.
OnConversationMessageReceiptChanged
public delegate void OnConversationMessageReceiptChanged(ZIM zim,List<ZIMMessageReceiptInfo> infos)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| infos | List<ZIMMessageReceiptInfo> | Receipt information. |
Details
When the message receiver has read the session, the message sender knows through this callback.
- Trigger: Trigger a notification when the message receiver has read the session.
- Related APIs: triggered when the peer calls via [SendConversationMessageReceiptRead].
- Available since: 2.5.0 and above.
OnConversationsAllDeleted
public delegate void OnConversationsAllDeleted(ZIM zim,ZIMConversationsAllDeletedInfo info)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| info | ZIMConversationsAllDeletedInfo | Info about all conversations be deleted. |
Details
When multiple login ends delete all conversations, the local end triggers the callback to notify the local end that all conversations are deleted.
- When to call /Trigger: When another end clears all unread conversations, the local end triggers a notification.
- Related APIs: Triggered by [DeleteAllConversations] .
- Available since: 2.12.0 and above.
OnMessageReceiptChanged
public delegate void OnMessageReceiptChanged(ZIM zim,List<ZIMMessageReceiptInfo> infos)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| infos | List<ZIMMessageReceiptInfo> | Receipt information. |
Details
When the message receiver confirms that the message has been read, the message sender knows through this callback.
- Trigger: Trigger a notification when the message receiver has read the message.
- Related APIs: triggered when the peer calls via [SendMessageReceiptsRead].
- Available since: 2.5.0 and above.
OnConversationTotalUnreadMessageCountUpdated
public delegate void OnConversationTotalUnreadMessageCountUpdated(ZIM zim,uint totalUnreadMessageCount)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| totalUnreadMessageCount | uint | Updated total unreads. |
Details
This callback is used to return the total unread of the session.
- When to call /Trigger: Log in, call [DeleteConversation], [DeleteMessage], [DeleteAllMessage], [ClearConversationUnreadMessageCount], [ClearConversationTotalUnreadMessageCount] Causes the message reading to change to trigger the callback.
- Related APIs: [DeleteConversation]、[DeleteMessage]、[DeleteAllMessage]、[ClearConversationUnreadMessageCount]、[ClearConversationTotalUnreadMessageCount]
- Available since: 2.0.0 and above.
OnMessageRevokeReceived
public delegate void OnMessageRevokeReceived(ZIM zim,List<ZIMRevokeMessage> messageList,uint message_list_length)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| messageList | List<ZIMRevokeMessage> | List of received messages. |
| message_list_length | uint | The length of the message list. |
Details
This callback is received when some one else sends a message and then revoke.
Call timing: This callback occurs when a ZIM instance is created with [Create] and the other user revoke a message.
- Related callbacks: You can revoke message to other members via [RevokeMessage].
- Available since: 2.5.0 or above.
OnMessageSentStatusChanged
public delegate void OnMessageSentStatusChanged(ZIM zim,List<ZIMMessageSentStatusChangeInfo> infos,uint infos_list_length)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| infos | List<ZIMMessageSentStatusChangeInfo> | List of received messages. |
| infos_list_length | uint | The length of the message list. |
Details
This callback is received when messages status changed.
Call timing: This callback occurs when messages status changed.
- Related callbacks: You can send message to other members via [SendMessage].
- Available since: 2.6.0 or above.
OnBroadcastMessageReceived
public delegate void OnBroadcastMessageReceived(ZIM zim,ZIMMessage message,ZIMEventOfBroadcastMessageReceivedResult data)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| message | ZIMMessage | Received message. |
| data | ZIMEventOfBroadcastMessageReceivedResult | The result of the event callback. |
Details
The callback is received when the server interface [SendMessageToAllUsers] sends a message.
Call time: This callback is received after logging in to the ZIM service and the server call the [SendMessageToAllUsers] interface to send a message.
OnMessageReactionsChanged
public delegate void OnMessageReactionsChanged(ZIM zim,List<ZIMMessageReaction> reactions)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| reactions | List<ZIMMessageReaction> | The list of changed reactions. |
Details
The callback is received when reactions change
When to Call: This callback can be registered after the ZIM instance is created by [create] and before login.
When to
- Trigger: After other users add or delete reactions to messages in private or group chats.
- Related APIs: [AddMessageReaction]、[DeleteMessageReaction]
OnMessageDeleted
public delegate void OnMessageDeleted(ZIM zim,ZIMMessageDeletedInfo deletedInfo)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| deletedInfo | ZIMMessageDeletedInfo | Deleted message information. |
Details
In the multi-terminal login scenario, after the user deletes the server level message on device A, other online multi-terminal devices will receive this callback..
OnReceivePeerMessage
public delegate void OnReceivePeerMessage(ZIM zim,List\<ZIMMessage> messageList,uint message_list_length,string fromUserID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| messageList | List<ZIMMessage> | List of received messages. |
| message_list_length | uint | The length of the message list. |
| fromUserID | string | The user ID of the message sender.The same as the peer-chat conversation ID. |
Details
This callback is received when you receive a point-to-point message from someone else.
Call timing: This callback occurs when a ZIM instance is created with [Create] and the other user sends you a message.
- Related callbacks: You can send messages to other members via [SendPeerMessage].
- Available since: 2.0.0 or above
OnReceiveRoomMessage
public delegate void OnReceiveRoomMessage(ZIM zim,List<ZIMMessage> messageList,uint message_list_length,string fromRoomID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| messageList | List<ZIMMessage> | List of received messages. |
| message_list_length | uint | The length of the message list. |
| fromRoomID | string | ID of the room where the message was received. |
Details
This callback is received when an in-room message is received.
Call timing: This callback occurs when a ZIM instance is created with [Create] and a group member sends a message.
- Related callbacks: You can send messages to other group members via [SendRoomMessage].
- Available since: 2.0.0 or above
OnMessageRepliedCountChanged
public delegate void OnMessageRepliedCountChanged(ZIM zim,List\< ZIMMessageRootRepliedCountInfo> infos)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| infos | List< ZIMMessageRootRepliedCountInfo> | A list of the number of replies to the root message. |
Details
When there is a new reply message, the number of replies to the corresponding root message is notified through this event.
- Available since: 2.17.0 or above
OnMessageRepliedInfoChanged
public delegate void OnMessageRepliedInfoChanged(ZIM zim,List\<ZIMMessage> messageList)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| messageList | List<ZIMMessage> | List of received messages. |
Details
Change event for a reply message received after the source message referenced by the reply message is deleted and withdrawn.
- Available since: 2.17.0 or above
OnReceiveGroupMessage
public delegate void OnReceiveGroupMessage(ZIM zim,List\<ZIMMessage> messageList,uint message_list_length,string fromGroupID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| messageList | List<ZIMMessage> | List of received messages. |
| message_list_length | uint | The length of the message list. |
| fromGroupID | string | The group ID of the message sender. |
Details
This callback is received when a group message is received.
Call timing: This callback occurs when a ZIM instance is created with [Create] and a group member sends a message.
- Related callbacks: You can send messages to other group members via [SendGroupMessage].
- Available since: 2.0.0 or above
OnRoomStateChanged
public delegate void OnRoomStateChanged(ZIM zim,ZIMRoomState state,ZIMRoomEvent event,Dictionary\<string, string> extendedData,string roomID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| state | ZIMRoomState | The current room connection state after changed. |
| event | ZIMRoomEvent | The event that caused the room connection state to change. |
| extendedData | Dictionary<string, string> | Extra information when the event occurs, a standard JSON string. |
| roomID | string | ID of the room where the status changed |
Details
event callback when the room connection status changes.
- When to call: creating a ZIM instance through [create], you can call this interface.
- Related APIs: through [OnTokenWillExpire], the callback will be received when the token is about to expire.
- Available since: 1.1.0 or above.
OnRoomMemberJoined
public delegate void OnRoomMemberJoined(ZIM zim,List<ZIMUserInfo> memberList,string roomID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| memberList | List<ZIMUserInfo> | List of members who joined the room. |
| roomID | string | The ID of the room where this event occurred. |
Details
After joining a room, when other members also join this room, they will receive this callback.
- Use cases: When other members in the room join, this callback will be called.
- When to call: After creating a ZIM instance through [Create], and the user is in a room joined by other members, you can call this interface.
- Caution: If the user is not currently in this room, this callback will not be called.
- Related APIs: You can use [OnRoomMemberLeft] to receive this callback when other room members leave.
- Available since: 1.1.0 or above.
OnRoomMemberLeft
public delegate void OnRoomMemberLeft(ZIM zim,List<ZIMUserInfo> memberList,string roomID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| memberList | List<ZIMUserInfo> | List of members who left the room. |
| roomID | string | The ID of the room where this event occurred. |
Details
After joining a room, when other members leave the room, they will receive this callback.
- Use cases: When other members in the room leave the room, this callback will be called.
- When to call: After creating a ZIM instance through [Create], and the user is in the same room of other members, you can call this interface.
- Caution: If the user is not currently in this room, this callback will not be called.
- Related APIs: You can receive this callback when other room members join through [OnRoomMemberJoined].
- Available since: 1.1.0 or above.
OnRoomAttributesUpdated
public delegate void OnRoomAttributesUpdated(ZIM zim,ZIMRoomAttributesUpdateInfo info,string roomID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | |
| info | ZIMRoomAttributesUpdateInfo | |
| roomID | string |
Details
When the room attribute in the room changes, it will be notified through this callback.
- Available since: 1.3.0.
OnRoomAttributesBatchUpdated
public delegate void OnRoomAttributesBatchUpdated(ZIM zim,string roomID,List<ZIMRoomAttributesUpdateInfo> infos)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | |
| roomID | string | |
| infos | List<ZIMRoomAttributesUpdateInfo> |
Details
When the room attribute in the room changes, it will be notified through this callback.
- Available since: 1.3.0.
OnRoomMemberAttributesUpdated
public delegate void OnRoomMemberAttributesUpdated(ZIM zim,List<ZIMRoomMemberAttributesUpdateInfo> infos,ZIMRoomOperatedInfo operatedInfo,string roomID)ZIMEventHandler.csParameters
| Name | Type | Description |
|---|---|---|
| zim | ZIM | ZIM instance. |
| infos | List<ZIMRoomMemberAttributesUpdateInfo> | The infos of the room member attributes changed. |
| operatedInfo | ZIMRoomOperatedInfo | Room operation information. |
| roomID | string | Room ID. |
Details
Details: This callback will be received when a user's property in the room is changed.
ZIMFileMessage
File message object.
Details
Identifies the basic parameters of a message.
- Caution: If the Type parameter of the base class is File during callback, you can force the base class message object to be of this type.
Declared in ZIMDefines.cs
Properties
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileUID
public string fileUIDDetail description: The unique ID of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMFileMessageLiteInfo
File message lite info object.
Details
Identifies the basic parameters of a message.
Declared in ZIMDefines.cs
Properties
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
ZIMFriendAddConfig
The behavior property of the Add Friend setting.
Details
The behavior property of the Add Friend setting.
Declared in ZIMDefines.cs
Properties
wording
public string wordingAdd a friend postscript.
friendAlias
public string friendAliasAlias of friend.
friendAttributes
public Record<string, string> friendAttributesFriend attributes. Up to 5 can be set. The key of the attribute can only be selected from k0 to k4.
ZIMFriendApplicationAcceptConfig
Behavior attributes for accepting friend requests.
Details
Behavior attributes for accepting friend requests.
Declared in ZIMDefines.cs
Properties
friendAlias
public string friendAliasfriend alias.
friendAttributes
public HashMap<String, String> friendAttributesfriend attributes.
pushConfig
ZIMFriendApplicationListQueryConfig
Query the configuration of the friend application list.
Details
Query the configuration of the friend application list.
Declared in ZIMDefines.cs
Properties
count
public int countTotal number of current queries.
nextFlag
public int nextFlagThe index of the current query anchor point.
ZIMFriendApplicationRejectConfig
Behavior attributes for rejecting friend application.
Details
Behavior attributes for rejecting friend application.
Declared in ZIMDefines.cs
Properties
pushConfig
ZIMFriendApplicationSendConfig
The behavior property of the Send Friend Application setting.
Details
The behavior property of the Send Friend Application setting.
Declared in ZIMDefines.cs
Properties
wording
public string wordingAdd a friend postscript.
friendAlias
public string friendAliasAlias of friend.
friendAttributes
public Record<string, string> friendAttributesFriend attributes. Up to 5 can be set. The key of the attribute can only be selected from k0 to k4.
pushConfig
ZIMFriendDeleteConfig
The behavior property of the Delete Friend setting.
Details
The behavior property of the Delete Friend setting.
Declared in ZIMDefines.cs
Properties
type
ZIMFriendListQueryConfig
Query the configuration of the friend list.
Details
Query the configuration of the friend list.
Declared in ZIMDefines.cs
Properties
count
public int countTotal number of current queries.
nextFlag
public int nextFlagThe index of the current query anchor point.
ZIMFriendRelationCheckConfig
Check the behavior properties of friend relationships.
Details
Check the behavior properties of friend relationships.
Declared in ZIMDefines.cs
Properties
type
ZIMFriendsSearchConfig
Search local friend configuration.
Details
Search local friend configuration.
Declared in ZIMDefines.cs
Properties
keywords
public string[] keywordsSearch keyword list.
isAlsoMatchFriendAlias
public bool isAlsoMatchFriendAliasWhether to match friend aliases.
count
public int countCurrent total number of searches.
nextFlag
public int nextFlagThe starting and ending index of the current search.
ZIMGroup
complete group information for group list.
Details
complete group information for group list.
Declared in ZIMDefines.cs
Properties
baseInfo
notificationStatus
public ZIMGroupMessageNotificationStatus notificationStatusgroup message notification status.
groupAlias
public string groupAliasthe group alias defined by user, which is visible only to that user.
ZIMGroupAdvancedConfig
Group advanced configuration.
Details
Group advanced configuration.
- Required: required.
Declared in ZIMDefines.cs
Properties
groupAttributes
public HashMap<String, String> groupAttributesGroup properties, up to 10 can be configured..
- Required: Optional.
groupNotice
public string groupNoticegroup notice.
- Required: Optional.
maxMemberCount
public uint maxMemberCountThe maximum number of group members.
- Use cases: When you need to limit the number of group members.
- Required: Optional.
- Default value: 0.
- Value range: [0, The default maximum number of group members for the business package].
- Caution: Supports version 2.15 and above.
joinMode
public ZIMGroupJoinMode joinModeVerification mode for joining the group.
- Required: Optional.
- Caution: Supports version 2.15 and above.
inviteMode
public ZIMGroupInviteMode inviteModeVerification mode for invite to the group.
- Required: Optional.
- Caution: Supports version 2.15 and above.
beInviteMode
public ZIMGroupBeInviteMode beInviteModeVerification mode for being invited to the group.
- Required: Optional.
- Caution: Supports version 2.15 and above.
ZIMGroupAttributesUpdateInfo
Group attribute update information.
Details
Group attribute update information.
Declared in ZIMDefines.cs
Properties
action
groupAttributes
public HashMap<String, String> groupAttributesgroup properties.
ZIMGroupFullInfo
complete group information.
Details
complete group information.
Declared in ZIMDefines.cs
Properties
baseInfo
groupAttributes
public HashMap<String, String> groupAttributesgroup properties.
groupNotice
public string groupNoticeGroup of announcement.
notificationStatus
public ZIMGroupMessageNotificationStatus notificationStatusgroup message notification status.
mutedInfo
public ZIMGroupMuteInfo mutedInfoGroup mute info.
createTime
public ulong createTimeThe timestamp of the server when the group was created.
- Caution: Supports version 2.15 and above.
maxMemberCount
public uint maxMemberCountThe maximum number of group members.
- Caution: Supports version 2.15 and above.
verifyInfo
public ZIMGroupVerifyInfo verifyInfoVerification mode for joining the group.
- Caution: Supports version 2.15 and above.
groupAlias
public string groupAliasthe group alias defined by user, which is visible only to that user.
ZIMGroupInfo
group information.
Details
group information.
Declared in ZIMDefines.cs
Properties
groupID
public string groupIDgroupID.
Required or not: Mandatory, it will be automatically generated in the background.
Value: Supports only digits, English characters, and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~' and not by '#' at the beginning.
groupName
public string groupNameGroup name.
- Required: Optional.
Value: A string of up to 50 bytes.
groupAvatarUrl
public string groupAvatarUrl- Required: not required.
Use Limit: the maximum number of characters is 500 bytes. There is no limit on special characters.
ZIMGroupMemberInfo
Group member information.
Details
Group member information.
Declared in ZIMDefines.cs
Properties
memberNickname
public string memberNicknameGroup member nickname.
memberRole
public int memberRolegroup role.
memberAvatarUrl
public string memberAvatarUrlDetailed description: group member avatar URL.
User Limit: the maximum number of characters is 500 bytes. There is no limit on special characters.
muteExpiredTime
public ulong muteExpiredTimeGroup member's mute expiration time. When it's 0, it means no mute; when it's -1, it means permanent mute.
groupEnterInfo
public ZIMGroupEnterInfo groupEnterInfoInformation about group members when they join the group.
- Caution: Supports version 2.15 and above.
userID
public string userIDUser ID, a string with a maximum length of 32 bytes or less. It is customized by the developer. Only support numbers, English characters and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'.
userName
public string userNameUser name, defined by you. For version 2.0.0 and onwards, the string has a maximum length of 256 bytes.
- Required: Not required.
- Privacy reminder: Please do not provide sensitive personal information, including but not limited to mobile phone numbers, ID card numbers, passport numbers, and real names.
userAvatarUrl
public string userAvatarUrlThe user avatar, which is custom generated by the developer, is not restricted by special characters and has a maximum length of 500 bytes.
- Required: Not required.
- Privacy reminder: Please do not provide sensitive personal information, including but not limited to mobile phone numbers, ID card numbers, passport numbers, and real names.
- Available since: 2.13.0 and above.
userExtendedData
public string userExtendedDataExtended field information of the user.
- Caution: This property has a value only for room users.
ZIMGroupMemberMuteConfig
Group members mute configuration.
Details
Group members mute configuration.
- Required: required.
Declared in ZIMDefines.cs
Properties
duration
public int durationGroup members mute duration, the unit is seconds. The value is -1, which means permanent mute. If you need to implement non-permanent mute, the upper limit is 604800 (7 days). If you need to increase it, please contact ZEGO technical support.
- Required: Required.
ZIMGroupMemberMutedListQueryConfig
Group muted member list query configuration.
Details
Group muted member list query configuration.
Declared in ZIMDefines.cs
Properties
count
public int countcount.
- Required: Required.
nextFlag
public ulong nextFlagnextFlag.
- Required: Not required, it is empty by default for the first time, which means to start the query from the beginning.
ZIMGroupMemberQueryConfig
group member query configuration.
Details
group member query configuration.
Declared in ZIMDefines.cs
Properties
count
public int countcount. Quantity, upper limit is 100, over 100 will be treated as 100.
- Required: Required.
nextFlag
public int nextFlagnextFlag.
- Required: Not required, it is empty by default for the first time, which means to start the query from the beginning.
ZIMGroupMemberSearchConfig
group member search configuration.
Details
group member search configuration.
Declared in ZIMDefines.cs
Properties
count
public int countcount.
- Required: Required.
nextFlag
public int nextFlagThe flag for querying, fill in 0 when calling the interface for the first time. When calling the interface again later, fill in the nextFlag returned from the callback to retrieve the remaining data.
- Required: Not required.
keywords
public List\<string> keywordsSearch keywords, up to 5 keywords are supported, otherwise an error will be reported. For example: passing in "1" and "2" will make the search results only show group members whose names contain both keywords "1" and "2".
- Required: No
- Caution: Up to 5 keywords can be entered, otherwise an error will be reported.
isAlsoMatchGroupMemberNickname
public bool isAlsoMatchGroupMemberNicknameWhether the search scope includes group member user nickname. Default is false.
- Required: No.
- Default value: false
ZIMGroupMessageReceiptMemberQueryConfig
Details
Group message receipt read/unread member query configuration.
Declared in ZIMDefines.cs
Properties
count
public int count- Required: Required.
nextFlag
public int nextFlagDetailed description: The next sign. Initially fill in 0, then get the next next flag from the [ZIMGroupMessageReceiptMemberListQueriedCallback] callback.
ZIMGroupMuteConfig
Group mute configuration.
Details
Group mute configuration.
- Required: required.
Declared in ZIMDefines.cs
Properties
mode
public ZIMGroupMuteMode modeGroup mute mode.
- Default value: All.
- Required: Required.
duration
public int durationGroup mute duration, the unit is seconds. The value is -1, which means permanent mute. If you need to implement non-permanent mute, the upper limit is 604800 (7 days). If you need to increase it, please contact ZEGO technical support.
- Required: Required.
roles
public std::vector<int> rolesGroup role list.
- Required: This field is only meaningful when ZIMGroupMuteMode is set to Custom.
- Caution: When there is a 3 (ordinary user) in the list, other roles must also be present and cannot be 1, 2, or 4. If only muting ordinary users is needed, ZIMGroupMuteMode should be set to Normal.
ZIMGroupOperatedInfo
The group causes the event to change the operator's information.
Details
The group causes the event to change the operator's information.
Declared in ZIMDefines.cs
Properties
operatedUserInfo
public ZIMGroupMemberInfo operatedUserInfoGroup member information.
userID
public string userIDThe operator's user ID.
userName
public string userNameThe operator's username.
memberNickname
public string memberNicknameThe operator's group member nickname.
memberRole
public int memberRoleThe operator's group member role.
ZIMGroupSearchConfig
Group search configuration.
Details
Group search configuration.
Declared in ZIMDefines.cs
Properties
count
public int countcount.
- Required: Required.
nextFlag
public int nextFlagThe flag used to search groups.
- Required: The flag should be 0 when you search groups for the first time. After that, the flag should be the same as the nextFlag from the search result Callback to get the next page data.
keywords
public List\<string> keywordsSearch keywords. For example: passing in "1" and "2" will make the search results only show groups whose group names contain both keywords "1" and "2".
- Required: No
- Caution: Up to 5 keywords can be entered, otherwise an error will be reported.
isAlsoMatchGroupMemberNickname
public bool isAlsoMatchGroupMemberNicknameWhether the search scope includes group member user nicknames. Default is false.
- Required: No.
- Default value: false
isAlsoMatchGroupMemberUserName
public bool isAlsoMatchGroupMemberUserNameWhether the search scope includes group member user names. Default is false.
- Required: No.
- Default value: false
ZIMGroupSearchInfo
Group search info.
Details
Group search info.
Declared in ZIMDefines.cs
Properties
groupInfo
userList
ZIMImageMessage
Image message object.
Details
Identifies the basic parameters of a message.
- Caution: If the Type parameter of the base class is Image during callback, you can force the base class message object to be of this type.
Declared in ZIMDefines.cs
Properties
thumbnailLocalPath
public string thumbnailLocalPathDetailed description: The thumbnail local path of the image file.
Required or not: The sender does not need to fill in it. After calling [downloadMediaFile] to download, the SDK will generate this value.
thumbnailDownloadUrl
public string thumbnailDownloadUrlDetail description: Thumbnail external download URL of the image file. When developers upload thumbnails to their own servers, the SDK can pass through this field to other users.
Required or not: optional on the sender side, this field will only take effect when fileDownloadUrl is filled in.
largeImageLocalPath
public string largeImageLocalPathDetailed description: The large image local path of the image file.
Required or not: The sender does not need to fill in it. After calling [downloadMediaFile] to download, the SDK will generate this value.
largeImageDownloadUrl
public string largeImageDownloadUrlDetail description: large Image external download URL of the image file. When developers upload large Images to their own servers, the SDK can pass through this field to other users.
Required or not: optional on the sender side, this field will only take effect when fileDownloadUrl is filled in.
originalImageWidth
public uint originalImageWidthOriginal image width.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the width of the original image,the unit is pixel.
originalImageHeight
public uint originalImageHeightOriginal image height.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the height of the original image,the unit is pixel.
largeImageWidth
public uint largeImageWidthLarge image width. When sending local images, the ZIM service will compress the shortest side of the original image to 720 pixels, with the other side being scaled proportionally. When the shortest side of the original image is less than 720 pixels, no compression is applied.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the width of the large image, the unit is pixel.
largeImageHeight
public uint largeImageHeightLarge image height. When sending local images, the ZIM service will compress the shortest side of the original image to 720 pixels, with the other side being scaled proportionally. When the shortest side of the original image is less than 720 pixels, no compression is applied.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the height of the large image, the unit is pixel.
thumbnailWidth
public uint thumbnailWidthThumbnail width. When sending local images, the ZIM service will compress the shortest side of the original image to 198 pixels, with proportional scaling applied to the other side. If the shortest side of the original image is smaller than 198 pixels, no compression will be performed.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the width of the thumbnail, the unit is pixel.
thumbnailHeight
public uint thumbnailHeightThumbnail height. When sending local images, the ZIM service will compress the shortest side of the original image to 198 pixels, with proportional scaling applied to the other side. If the shortest side of the original image is smaller than 198 pixels, no compression will be performed.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the height of the thumbnail, the unit is pixel.
originalImageSize
public CGSize originalImageSizeDetailed description: The width and height of the original image.
Business scenario: When the user needs to draw a picture UI, the parameters used to determine the width and height of the original picture.
largeImageSize
public CGSize largeImageSizeDetailed description: The width and height of the large image.
Business scenario: When the user needs to draw a picture UI, the parameters used to determine the width and height of the large picture.
thumbnailSize
public CGSize thumbnailSizeDetailed description: Thumbnail width and height.
Business scenario: When the user needs to draw a picture UI, the parameters used to determine the width and height of the thumbnail.
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileUID
public string fileUIDDetail description: The unique ID of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMImageMessageLiteInfo
Image message lite info object.
Details
Identifies the basic parameters of a image message.
Declared in ZIMDefines.cs
Properties
thumbnailLocalPath
public string thumbnailLocalPathDetailed description: The thumbnail local path of the image file.
Required or not: The sender does not need to fill in it. After calling [downloadMediaFile] to download, the SDK will generate this value.
thumbnailDownloadUrl
public string thumbnailDownloadUrlDetail description: Thumbnail external download URL of the image file. When developers upload thumbnails to their own servers, the SDK can pass through this field to other users.
Required or not: optional on the sender side, this field will only take effect when fileDownloadUrl is filled in.
largeImageLocalPath
public string largeImageLocalPathDetailed description: The large image local path of the image file.
Required or not: The sender does not need to fill in it. After calling [downloadMediaFile] to download, the SDK will generate this value.
largeImageDownloadUrl
public string largeImageDownloadUrlDetail description: large Image external download URL of the image file. When developers upload large Images to their own servers, the SDK can pass through this field to other users.
Required or not: optional on the sender side, this field will only take effect when fileDownloadUrl is filled in.
originalImageWidth
public uint originalImageWidthOriginal image width.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the width of the original image,the unit is pixel.
originalImageHeight
public uint originalImageHeightOriginal image height.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the height of the original image,the unit is pixel.
largeImageWidth
public uint largeImageWidthLarge image width. When sending local images, the ZIM service will compress the shortest side of the original image to 720 pixels, with the other side being scaled proportionally. When the shortest side of the original image is less than 720 pixels, no compression is applied.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the width of the large image, the unit is pixel.
largeImageHeight
public uint largeImageHeightLarge image height. When sending local images, the ZIM service will compress the shortest side of the original image to 720 pixels, with the other side being scaled proportionally. When the shortest side of the original image is less than 720 pixels, no compression is applied.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the height of the large image, the unit is pixel.
thumbnailWidth
public uint thumbnailWidthThumbnail width. When sending local images, the ZIM service will compress the shortest side of the original image to 198 pixels, with proportional scaling applied to the other side. If the shortest side of the original image is smaller than 198 pixels, no compression will be performed.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the width of the thumbnail, the unit is pixel.
thumbnailHeight
public uint thumbnailHeightThumbnail height. When sending local images, the ZIM service will compress the shortest side of the original image to 198 pixels, with proportional scaling applied to the other side. If the shortest side of the original image is smaller than 198 pixels, no compression will be performed.
- Use cases: When the user needs to draw the image UI, the parameter used to determine the height of the thumbnail, the unit is pixel.
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
ZIMLogConfig
Log configuration
Details
Configure the storage path of log files and the maximum log file size.
Declared in ZIMDefines.cs
Properties
logPath
public string logPathThe storage path of the log files. Refer to the official website document for the default path.
logSize
public ulong logSizeThe maximum log file size (Bytes). The default maximum size is 5MB (5 * 1024 * 1024 Bytes)
ZIMMediaDownloadConfig
Configuration for downloading media files.
Declared in ZIMDefines.cs
Properties
messageInfoIndex
public int messageInfoIndexDetailed description: The index of the array where a file in the download multiple message is located.
- Required: Required when downloading a multiple message file.
ZIMMediaMessage
Base class for media message objects.
Details
Detail description: Identifies a media message.
This base class is the basis of all media messages and contains the properties required by media messages.
Declared in ZIMDefines.cs
Properties
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileUID
public string fileUIDDetail description: The unique ID of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMMediaMessageLiteInfo
Base class for media message lite info objects.
Details
Detail description: Identifies a media message lite info.
This base class is the basis of all media messages lite info and contains the properties required by media messages lite info.
Declared in ZIMDefines.cs
Properties
fileLocalPath
public string fileLocalPath- Required: If a local file is sent, this parameter must be set by the sender. Otherwise, the message fails to be sent.
fileDownloadUrl
public string fileDownloadUrlDetail description: The external download url of the media message is used for the developer to transparently transmit the media file to other users by filling in this URL when the developer uploads the media file to his own server.
Required or not: If an external URL is sent, this parameter is mandatory on the sender end.
fileName
public string fileNameDetail description: The filename of the media file.
Required or not: If you are sending an external URL, you need to fill in this value and include the file extension. If a local file is sent, the value is optional.
fileSize
public ulong fileSizeDetail description: The size of the media file.
Required or not: The sender does not need to fill in, this value is generated by the SDK.
ZIMMediaMessageSendNotification
The notification callback when the media message is sent, you can get the relevant information before the message object is sent through this notification
Details
Detailed description: Through this notification, developers can obtain relevant information before the message object is sent, such as localMessageID, etc.
Business scenario: When developers need to record and cache relevant information before sending a message, they can obtain it by listening to the notification.
If no monitoring is required, it can be passed null.
Declared in ZIMDefines.cs
Properties
onMessageAttached
public ZIMMessageAttachedCallback onMessageAttached- Required: not required. If no monitoring is required, it can be passed empty.
Default: empty.
onMediaUploadingProgress
public ZIMMediaUploadingProgress onMediaUploadingProgress- Required: not required. If no monitoring is required, it can be passed empty.
Default: empty.
ZIMMessage
Base class of message object
Details
Identifies the basic parameters of a message.
- Caution: Some of the parameters, such as Message ID, only have values during the callback. Developers do not need to assign values to these parameters when they actively create this object for sending messages.
Declared in ZIMDefines.cs
Properties
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMMessageDeleteConfig
Details
Delete configurations related to messages.
Declared in ZIMDefines.cs
Properties
isAlsoDeleteServerMessage
public bool isAlsoDeleteServerMessageWhether to remove flags for server messages.
- Required: not required.
- Default value: false.
ZIMMessageExportConfig
Details
Export the configuration of the message. The Config is currently a reserved parameter.
Declared in ZIMDefines.cs
ZIMMessageImportConfig
Details
Import the configuration of the message. The Config is currently a reserved parameter.
Declared in ZIMDefines.cs
ZIMMessageMentionedInfo
message mention information.
Details
message mention information.
Declared in ZIMDefines.cs
Properties
messageID
public long messageIDMessage ID, used to match the notification information to which message it belongs to
Required or not: Developers do not need to fill in.'‘’
fromUserID
public string fromUserIDFrom which user.
- Required: Developers do not need to fill in."
type
public ZIMMessageMentionedType typeType of notification, used to distinguish between reminding oneself and reminding everyone.
- Required: Developers do not need to fill in.
messageSeq
public ulong messageSeqmessage seq.
ZIMMessageQueryConfig
Example Query message configuration.
Details
Example Query the configurations of messages.
Declared in ZIMDefines.cs
Properties
nextMessage
public ZIMMessage nextMessageQuery the anchor point of the message.
- Required: This parameter is not required for the first query but is required for subsequent paging queries.
count
public uint countNumber of query messages.
- Required: Yes.
reverse
public Boolean reverseIndicates whether the query is in reverse order.
- Required: not required.
- Default value: false.
ZIMMessageReactionUserQueryConfig
Configuration for querying reaction user list
Details
When querying reaction member, you need to configure this object.
Declared in ZIMDefines.cs
Properties
nextFlag
public ulong nextFlagThe flag of the paging query. For the first query, set this field to an empty string. If the "nextFlag" field of the [ZIMMessageReactionUserListQueriedCallback] callback is not an empty string, it needs to be set here to continue the query on the next page.
- Required: Not required.
count
public uint countHow many members are retrieved in one query, 100 at most. Exceeding 100 will result in an error.
- Caution: To obtain members in pages to reduce overhead, it is recommended to obtain within 20 members at a time. If the value is 0, the SDK will query 100 members by default.
- Required: Required.
reactionType
public string reactionTypereaction type, defined by you.
ZIMMessageRepliedListQueryConfig
Configuration for querying reply message list.
Declared in ZIMDefines.cs
Properties
nextFlag
public ulong nextFlagThe flag of paginated query. When querying for the first time, set this field to 0. If the "nextFlag" field of the [queryMessageRepliedList] callback is not 0, it means that the query has not ended yet. You need to set it here to continue querying the next page.
count
public uint countThe number of queries per query. The upper limit is 100. Exceeding 100 will result in an error.
- Required: Required.
ZIMMessageRevokeConfig
Details
Revoke configurations related to messages.
Declared in ZIMDefines.cs
Properties
revokeExtendedData
public string revokeExtendedDatarevoking additional messages.
- Required: Not required.
pushConfig
public ZIMPushConfig pushConfigConfigures the offline push function, If Android or iOS platform is integrated, it is strongly recommended to configure this.
- Required: Not required.
ZIMMessageSearchConfig
Message search configuration.
Details
Message search configuration.
Declared in ZIMDefines.cs
Properties
nextMessage
public ZIMMessage nextMessagePaging fetch flag, which means fetching messages before or after nextMessage, with "before" or "after" determined by the order value. On the first search, nextMessage is null. On subsequent searches, nextMessage needs to pass in the last message in the message list queried last time.
count
public int countcount It is recommended to keep the number of items less than 20 to reduce performance overhead.
- Required: Required.
order
public ZIMMessageOrder orderWhen the "order" is "DESCENDING" during message search, it means querying messages with sending time earlier than nextMessage. If it's the first message query (i.e. nextMessage is null), then query from the last message stored locally forward. When "order" is "ASCENDING", it means querying messages with sending time later than nextMessage. If it's the first message query (i.e. nextMessage is null), then query from the first message stored locally backward. The default is "DESCENDING".
keywords
public List\<string> keywordsSearch keywords, up to 5 keywords are supported, otherwise an error will be reported. For example: passing in "1" and "2" will make the search results only show messages that contain both keywords "1" and "2".
messageTypes
public List<ZIMMessageType> messageTypesMessage types, can be used to specify message types. Support passing in multiple types.
subMessageTypes
public int[] subMessageTypesThe subtypes of custom messages have a value range of [0,200]. Developers can use this range to search for specific custom types.
senderUserIDs
public string[] senderUserIDsThe user ID of the message sender, supporting up to 5 IDs. For example, if "zego2023" is passed in, the search results will only display all the messages sent by the user "zego2023" in that conversation.
startTime
public long startTimeThe starting point of the search, in milliseconds, with a default value of 0. The format is UTC timestamp.
endTime
public long endTimeThe ending point of the search, which must be greater than the startTime, in milliseconds. The default value is 0 and the format is UTC timestamp.
ZIMMessageSendConfig
Details
Configurations related to sending messages.
Declared in ZIMDefines.cs
Properties
pushConfig
public ZIMPushConfig pushConfigConfigures the offline push function, If Android or iOS platform is integrated, it is strongly recommended to configure this.
- Required: Not mandatory.
priority
hasReceipt
public bool hasReceipt- Required: not required.
- Default value: false.
isNotifyMentionedUsers
public bool isNotifyMentionedUsers- Required: not required.
- Default value: true.
isRetrySend
public bool isRetrySendWhether to resend the failed message.
- Required: No.
disableUnreadMessageCount
public ~ disableUnreadMessageCount- Required: No.
- Default value: false.
ZIMMessageSendNotification
The notification callback when the message is sent, you can get the relevant information before the message object is sent through this notification
Details
Detailed description: Through this notification, developers can obtain relevant information before the message object is sent, such as localMessageID, etc.
Business scenario: When developers need to record and cache relevant information before sending a message, they can obtain it by listening to the notification.
If no monitoring is required, it can be passed null.
Declared in ZIMDefines.cs
Properties
onMessageAttached
public ZIMMessageAttachedCallback onMessageAttached- Required: not required. If no monitoring is required, it can be passed empty.
Default: empty.
onMediaUploadingProgress
public ZIMMediaUploadingProgress onMediaUploadingProgress- Required: not required. If no monitoring is required, it can be passed empty.
onMultipleMediaUploadingProgress
public ZIMMultipleMediaUploadingProgress onMultipleMediaUploadingProgressThrough this notification, developers can obtain the progress callback of the media file upload in the multiple message.
- Use cases: Developers can use it to display the upload progress of each media file and the total upload progress to improve the UI interaction experience.
- Required: not required.
- Available since: 2.19.0 and above.
ZIMMessageSentStatusChangeInfo
Notice of Room Message Status Change.
Details
Notice of Room Message Status Change.
Declared in ZIMDefines.cs
Properties
message
status
reason
public string reasonThis field stores the reason why a message was rejected by ZEGOCLOUD In-app Chat due to interception by the server-side callback on message not sent yer. If you have enabled the ZEGOCLOUD In-app Chat content moderation service and require this field to capture failure reasons caused by failed content moderation, contact ZEGOCLOUD Technical Support for configuration.
ZIMMultipleMessage
Multiple message object.
Details
Detailed description: Identifies a multiple message.
Only supports the multiple of text, image, file, audio, video, and custom messages, and the number of array does not exceed 20.
Declared in ZIMDefines.cs
Properties
messageInfoList
public List<ZIMMessageLiteInfo> messageInfoListIt can contain text, image, file, audio, video, and custom messages. The array length does not exceed 20.
- Use cases: It can be used to send text and image multiple messages.
- Recommended value: The total number of items does not exceed 20, the maximum number of image is 10, and the maximum number of file, audio, video and custom message is 1 each. The size and format restrictions of image, file, audio, and video are the same as those of the corresponding rich media messages.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMMultipleMessageLiteInfo
Multiple message lite info object.
Details
Identifies the basic parameters of a multiple message.
Declared in ZIMDefines.cs
Properties
messageInfoList
public List<ZIMMessageLiteInfo> messageInfoListDetail description: A list of elements that compose the message.
ZIMPushConfig
Description
push configuration.Details
Details: Configuration before sending offline push.
Declared in ZIMDefines.cs
Properties
title
public string titleUsed to set the push title.
- Required: Not required.
content
public string contentUsed to set offline push content.
- Required: Not required.
payload
public string payloadThis parameter is used to set the pass-through field of offline push.
- Required: Not required.
resourcesID
public string resourcesIDA string defined by you, no more than 32 characters in length, used to map advanced configurations for offline push from multiple manufacturers, abstracting the push configurations of various manufacturers into a single push strategy that you define yourself. For detailed introduction and configuration steps, please refer to ResourcesID introduction.
- Required: Not required.
enableBadge
public bool enableBadgePush whether to carry corner information switch.
badgeIncrement
public int badgeIncrementThe incremental index number carried by the push.
voIPConfig
public ZIMVoIPConfig voIPConfigIf you use Flutter, RN ZPNs, offline push receiving device has iOS and uses VoIP push type, you can customize some VoIP options with this parameter.
privateMessageTemplate
public ZIMOfflinePushPrivateMessageTemplate privateMessageTemplateIf you use OPPO push notifications, you can apply the OPPO Private message template through this structure; otherwise, you can ignore it and it will be left blank by default.
ZIMRevokeMessage
Base class for revoke message objects.
Details
Detail description: Identifies a revoke message.
This base class is the basis of all revoke messages and contains the properties required by revoke messages.
Declared in ZIMDefines.cs
Properties
revokeType
revokeStatus
revokeTimestamp
public int revokeTimestampDetail description: revoke timestamp.
operatedUserID
public string operatedUserIDDetail description: operated user ID.
revokeExtendedData
public string revokeExtendedDataDetail description: revoke extended data.
originalMessageType
originalTextMessageContent
public string originalTextMessageContentoriginal text message content
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
ZIMRevokeMessageLiteInfo
Base class for revoke message lite info objects.
Declared in ZIMDefines.cs
ZIMRoomAdvancedConfig
Room advanced config.
Details
Room‘s advanced config.
Declared in ZIMDefines.cs
Properties
roomAttributes
public std::unordered_map<std::string, std::string> & roomAttributesRoom attributes of a room.
roomDestroyDelayTime
public uint roomDestroyDelayTimeRoom destruction time delayed, the unit is seconds. The maximum room destroy delay time is 3 hours.
- Use cases: If the number of rooms is 0, set the room time to ensure that the room exists during this period.
- Required: Not mandatory.
ZIMRoomAttributesBatchOperationConfig
The behavior attribute set by the room attribute.
Details
The behavior attribute set by the room attribute.
Declared in ZIMDefines.cs
Properties
isDeleteAfterOwnerLeft
public bool isDeleteAfterOwnerLeftRoom attributes are automatically deleted after the owner leaves the room.
- Required: Not required.
isForce
public bool isForceWhether the operation is mandatory, that is, the property of the room whose owner is another user can be modified.
- Required: Not required.
isUpdateOwner
public bool isUpdateOwnerWhether to update the owner of the room attribute involved.
- Required: Not required.
ZIMRoomAttributesDeleteConfig
The behavior attribute set by the room attribute.
Details
The behavior attribute set by the room attribute.
Declared in ZIMDefines.cs
Properties
isForce
public bool isForceWhether the operation is mandatory, that is, the property of the room whose owner is another user can be deleted.
- Required: Not required.
ZIMRoomAttributesSetConfig
The behavior attribute set by the room attribute.
Details
The behavior attribute set by the room attribute.
Declared in ZIMDefines.cs
Properties
isDeleteAfterOwnerLeft
public bool isDeleteAfterOwnerLeftRoom attributes are automatically deleted after the owner leaves the room.
- Required: Not required.
isForce
public bool isForceWhether the operation is mandatory, that is, the property of the room whose owner is another user can be modified.
- Required: Not required.
isUpdateOwner
public bool isUpdateOwnerWhether to update the owner of the room attribute involved.
- Required: Not required.
ZIMRoomAttributesUpdateInfo
Notice of Room Attribute Change.
Details
Notice of Room Attribute Change.
Declared in ZIMDefines.cs
Properties
action
public ZIMRoomAttributesUpdateAction actionBehavioral information of room attribute change notification.
roomAttributes
public std::unordered_map<std::string, std::string> roomAttributesRoom attributes.
ZIMRoomFullInfo
The room details object.
Details
Identifies the basic parameters of a message.
- Caution: Identifies the detailed information of a room.
Declared in ZIMDefines.cs
Properties
baseInfo
ZIMRoomInfo
Room information object.
Details
Identifies a unique room.
Declared in ZIMDefines.cs
Properties
roomID
public string roomIDRoom ID. a string with a maximum length of 128 bytes. It is customized by the developer and supports only digits, English characters, , and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', ''.
roomName
public string roomNameRoom name, It is customized by the developer .a string with a maximum length of 64 bytes or less
ZIMRoomMemberQueryConfig
Configuration for querying room member.
Details
When querying member, you need to configure this object.
Declared in ZIMDefines.cs
Properties
nextFlag
public string nextFlagThe flag of the paging query. For the first query, set this field to an empty string. If the "nextFlag" field of the callback is not an empty string, it needs to be set here to continue the query on the next page.
- Required: Not required.
count
public uint countHow many messages are retrieved in one query.
- Caution: To obtain messages in pages to reduce overhead, it is recommended to obtain within 100 messages at a time. If the value is 0, the SDK will query 100 room member by default.
- Required: Required.
ZIMTextMessage
Normal text message object.
Details
Identifies the basic parameters of a message.
- Caution: If the Type parameter of the base class is Text during callback, you can force the base class message object to be of this type.
Declared in ZIMDefines.cs
Properties
message
public string messageThe content of the text message.
type
messageID
public long messageIDThe unique ID that identifies this message.
- Use cases: Can be used to index other messages.
- Caution: When the developer actively creates a message, there is no need to modify this parameter. This parameter only has a value during callback.
timestamp
public ulong timestampIdentifies the sending time of a message
- Use cases: Used to present the sending time of a message, and can be used for message sorting.
- Caution: This is a standard UNIX timestamp, in milliseconds.
message_length
public uint message_lengthThe length of the message. If the message type is text, it should be the length of the string.
senderUserID
public string senderUserIDDisplays the userID of the sender of this message.
conversationID
public string conversationIDConversation ID. Ids of the same conversation type are unique.
direction
public ZIMMessageDirection directionUsed to describe whether a message is sent or received.
sentStatus
conversationType
public ZIMConversationType conversationTypeThe type of conversation to which the message belongs.
conversationSeq
public ulong conversationSeqIndicates the sequence number of the message in the conversation.
orderKey
public long orderKeyThe larger the orderKey, the newer the message, and can be used for ordering messages.
localMessageID
public long localMessageIDSDK locally generated MessageID, developers do not need to pay attention to.
isUserInserted
public bool isUserInsertedDetail description: Describes whether the message is a message inserted by the developer through [insertMessageToLocalDB].
Default: false.
receiptStatus
public ZIMMessageReceiptStatus receiptStatusDescribe the receipt status of the message
Business scenario: used to determine the status of the current message in the receipt message
extendedData
public string extendedDatamessage extension field
- Use cases: You can add extended fields to the message and send it to the peer
- Required: no
- Caution: the length is 1k, you can contact technical support for configuration
- Available since: 2.6.0 or higher
localExtendedData
public string localExtendedDataThe expandable message field visible only on this end can store additional information locally, Through [updateMessageLocalExtendedData] change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
isBroadcastMessage
public bool isBroadcastMessageWhether the message is pushed by all employees.
- Required: Internal assignment.
isMentionAll
public bool isMentionAllWhether to mention everyone. It can be presented as "@Everyone".
- Use cases: For example, it can be used in groups or rooms.
- Required: No.
- Default value: false.
- Recommended value: Set to true if you need to mention everyone.
- Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
mentionedUserIDs
public ArrayList\<String> mentionedUserIDsWhether to mention everyone. It can be presented as "@User".
- Use cases: For example, it can be used in sending messages.
- Required: No.
- Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves
- Available since: 2.14.0 or above
messageSeq
public ulong messageSeqIndicates the sequence number of the message in the conversation.
rootRepliedCount
public uint rootRepliedCountThe number of reply messages corresponding to the root message of the reply message tree.
repliedInfo
public ZIMMessageRepliedInfo repliedInfoInformation about the source message referenced by the reply message.
editorUserID
public string editorUserIDThe latest editor's userID for this message.
editedTime
public ulong editedTimeThe latest editing timestamp for this message.
isGroupTargetedMessage
public bool isGroupTargetedMessageIdentify if this message is group targeted message.
Methods
ZIMTextMessage
ZIMTextMessageLiteInfo
Normal text message lite info object.
Details
Identifies the basic parameters of a message lite info.
- Caution: If the Type parameter of the base class is Text during callback, you can force the base class message lite info object to be of this type.
Declared in ZIMDefines.cs
Properties
message
public string messageThe content of the text message.
Methods
ZIMTextMessageLiteInfo
ZIMUserFullInfo
User full information object.
Details
Identifies a unique user.
- Caution: that the userID must be unique under the same appID, otherwise mutual kicks out will occur. It is strongly recommended that userID corresponds to the user ID of the business APP, that is, a userID and a real user are fixed and unique, and should not be passed to the SDK in a random userID. Because the unique and fixed userID allows ZEGO technicians to quickly locate online problems.
Declared in ZIMDefines.cs
Properties
baseInfo
userAvatarUrl
public string userAvatarUrl- Required: not required.
Use restrictions: The value is a maximum of 500 bytes and contains no special characters.
extendedData
public string extendedData- Required: not required.
Privacy Protection Statement: Do not pass in sensitive information involving personal privacy, including but not limited to mobile phone numbers, ID numbers, passport numbers, real names, etc.
ZIMUserInfo
User information object.
Details
Identifies a unique user.
- Caution: that the userID must be unique under the same appID, otherwise mutual kicks out will occur. It is strongly recommended that userID corresponds to the user ID of the business APP, that is, a userID and a real user are fixed and unique, and should not be passed to the SDK in a random userID. Because the unique and fixed userID allows ZEGO technicians to quickly locate online problems.
Declared in ZIMDefines.cs
Properties
userID
public string userIDUser ID, a string with a maximum length of 32 bytes or less. It is customized by the developer. Only support numbers, English characters and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'.
userName
public string userNameUser name, defined by you. For version 2.0.0 and onwards, the string has a maximum length of 256 bytes.
- Required: Not required.
- Privacy reminder: Please do not provide sensitive personal information, including but not limited to mobile phone numbers, ID card numbers, passport numbers, and real names.
userAvatarUrl
public string userAvatarUrlThe user avatar, which is custom generated by the developer, is not restricted by special characters and has a maximum length of 500 bytes.
- Required: Not required.
- Privacy reminder: Please do not provide sensitive personal information, including but not limited to mobile phone numbers, ID card numbers, passport numbers, and real names.
- Available since: 2.13.0 and above.
userExtendedData
public string userExtendedDataExtended field information of the user.
- Caution: This property has a value only for room users.
ZIMUsersInfoQueryConfig
User information query configuration.
Details
Detailed description: User information query configuration, you can choose to query from the local or from the server. Query the unlimited frequency constraints from the local, and query the limited frequency constraints from the server. You can only query the detailed configuration of 10 users within 10 s.
Declared in ZIMDefines.cs
Properties
isQueryFromServer
public bool isQueryFromServer- Required: not required.
Default: false.
