From 167506289c9789cda2d69bf232dfbe7edae7b2af Mon Sep 17 00:00:00 2001 From: haoxiuwen Date: Fri, 22 Nov 2024 19:09:11 +0800 Subject: [PATCH 1/2] modify --- docs/document/flutter/group_manage.md | 22 ++++++++++++++++++---- docs/document/flutter/presence.md | 6 +++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/document/flutter/group_manage.md b/docs/document/flutter/group_manage.md index a6951cd7..9c7c954a 100644 --- a/docs/document/flutter/group_manage.md +++ b/docs/document/flutter/group_manage.md @@ -107,11 +107,9 @@ try { 1. 调用 `EMGroupManager#fetchPublicGroupsFromServer` 方法从服务器获取公开群列表,查询到想要加入的群组 ID。 2. 根据加群是否需要验证,调用不同的方法: + - 若无需验证,调用 `EMGroupManager#joinPublicGroup` 方法传入群组 ID,申请加入对应群组。 - - 若需要验证,调用 `requestToJoinPublicGroup` 方法传入群组 ID,申请加入对应群组。 - -示例代码如下: - + ```dart // 获取公开群组列表 try { @@ -127,6 +125,22 @@ try { } ``` +若需要验证,调用 `requestToJoinPublicGroup` 方法传入群组 ID,申请加入对应群组。 + +```dart +// 获取公开群组列表 +try { + EMCursorResult result = + await EMClient.getInstance.groupManager.fetchPublicGroupsFromServer(); +} on EMError catch (e) { +} + +// 申请加入群组 +try { + await EMClient.getInstance.groupManager.requestToJoinPublicGroup('groupId'); + } on EMError catch (e) {} +``` + ### 退出群组 群成员可以调用 `LeaveGroup` 方法退出群组,其他成员收到 `EMGroupEventHandler#onMemberExitedFromGroup` 事件。退出群组后,该用户将不再收到群消息。群主不能调用该接口退出群组,只能调用 [`DestroyGroup`](#解散群组) 解散群组。 diff --git a/docs/document/flutter/presence.md b/docs/document/flutter/presence.md index b4bc3f38..91bddc3f 100644 --- a/docs/document/flutter/presence.md +++ b/docs/document/flutter/presence.md @@ -15,7 +15,7 @@ - `publishPresence`:发布自定义在线状态; - `subscribe`:订阅用户的在线状态; - `onPresenceStatusChanged` 被订阅用户的在线状态变更时,订阅者收到监听回调; -- `unSubscribe`:无需关注用户的在线状态时,取消订阅; +- `unsubscribe`:无需关注用户的在线状态时,取消订阅; - `fetchSubscribedMembers` 获取订阅列表; - `fetchPresenceStatus` 获取指定用户状态; @@ -105,12 +105,12 @@ try { ### 取消订阅指定用户的在线状态 -若取消指定用户的在线状态订阅,可调用 `EMPresenceManager#unSubscribe` 方法,示例代码如下: +若取消指定用户的在线状态订阅,可调用 `EMPresenceManager#unsubscribe` 方法,示例代码如下: ```dart // members: 将要取消订阅的用户列表 try { - await EMClient.getInstance.presenceManager.unSubscribe( + await EMClient.getInstance.presenceManager.unsubscribe( members: members, ); } on EMError catch (e) { From 82a60c419c80f54a85753dbfbf5d14db6a0f475a Mon Sep 17 00:00:00 2001 From: haoxiuwen Date: Fri, 22 Nov 2024 19:11:42 +0800 Subject: [PATCH 2/2] modify --- docs/document/android/push/push_display.md | 2 +- docs/document/android/push/push_extension.md | 2 +- docs/document/harmonyos/push/push_display.md | 2 +- docs/document/ios/push/push_display.md | 2 +- docs/document/ios/push/push_extension.md | 2 +- docs/document/react-native/push/push_display.md | 2 +- docs/document/react-native/push/push_extension.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/document/android/push/push_display.md b/docs/document/android/push/push_display.md index b3fe2f12..621e5833 100644 --- a/docs/document/android/push/push_display.md +++ b/docs/document/android/push/push_display.md @@ -81,7 +81,7 @@ EMPushManager.DisplayStyle style = pushConfigs.getDisplayStyle(); :::tip 1. 设置推送模板为推送的高级功能,使用前需要在[环信即时通讯控制台](https://console.easemob.com/user/login)的**即时通讯 > 功能配置 > 功能配置总览**页面激活推送高级功能。如需关闭推送高级功能必须联系商务,因为该操作会删除所有相关配置。 -2. 推送模板相关的数据结构,详见[推送扩展字段](/document/server-side/push_extension.html)。 +2. 推送模板相关的数据结构,详见[推送扩展字段](https://doc.easemob.com/document/server-side/push_extension.html)。 ::: ### 发消息时使用推送模板 diff --git a/docs/document/android/push/push_extension.md b/docs/document/android/push/push_extension.md index ea2165ec..95f3927c 100644 --- a/docs/document/android/push/push_extension.md +++ b/docs/document/android/push/push_extension.md @@ -2,7 +2,7 @@ 你可以利用扩展字段实现自定义推送设置,本文以强制推送和发送静默消息为例介绍如何实现推送扩展功能。 -对于推送扩展字段,详见[离线推送扩展字段文档](/document/server-side/push_extension.html)。 +对于推送扩展字段,详见[离线推送扩展字段文档](https://doc.easemob.com/document/server-side/push_extension.html)。 ## 设置自定义推送字段 diff --git a/docs/document/harmonyos/push/push_display.md b/docs/document/harmonyos/push/push_display.md index 0353aaff..3c1635ea 100644 --- a/docs/document/harmonyos/push/push_display.md +++ b/docs/document/harmonyos/push/push_display.md @@ -65,7 +65,7 @@ ChatClient.getInstance().pushManager()?.updatePushDisplayStyle(displayStyle).the :::tip 1. 设置推送模板为推送的高级功能,使用前需要在[环信即时通讯控制台](https://console.easemob.com/user/login)的**即时通讯 > 功能配置 > 功能配置总览**页面激活推送高级功能。如需关闭推送高级功能必须联系商务,因为该操作会删除所有相关配置。 -2. 推送模板相关的数据结构,详见[推送扩展字段](/document/server-side/push_extension.html)。 +2. 推送模板相关的数据结构,详见[推送扩展字段](https://doc.easemob.com/document/server-side/push_extension.html)。 ::: #### **发送消息时使用推送模板** diff --git a/docs/document/ios/push/push_display.md b/docs/document/ios/push/push_display.md index a4c4a894..eeb05c06 100644 --- a/docs/document/ios/push/push_display.md +++ b/docs/document/ios/push/push_display.md @@ -97,7 +97,7 @@ :::tip 1. 设置推送模板为推送的高级功能,使用前需要在[环信即时通讯控制台](https://console.easemob.com/user/login)的**即时通讯 > 功能配置 > 功能配置总览**页面激活推送高级功能。如需关闭推送高级功能必须联系商务,因为该操作会删除所有相关配置。 -2. 推送模板相关的数据结构,详见[推送扩展字段](/document/server-side/push_extension.html)。 +2. 推送模板相关的数据结构,详见[推送扩展字段](https://doc.easemob.com/document/server-side/push_extension.html)。 ::: ### 发送消息时使用推送模板 diff --git a/docs/document/ios/push/push_extension.md b/docs/document/ios/push/push_extension.md index 7d078704..be1c53be 100644 --- a/docs/document/ios/push/push_extension.md +++ b/docs/document/ios/push/push_extension.md @@ -2,7 +2,7 @@ 你可以利用扩展字段实现自定义推送设置,本文以强制推送、发送静默消息和富文本推送为例介绍如何实现推送扩展功能。 -对于推送扩展字段,详见[离线推送扩展字段文档](/document/server-side/push_extension.html)。 +对于推送扩展字段,详见[离线推送扩展字段文档](https://doc.easemob.com/document/server-side/push_extension.html)。 ## 自定义推送字段 diff --git a/docs/document/react-native/push/push_display.md b/docs/document/react-native/push/push_display.md index baa83e6a..61cb368a 100644 --- a/docs/document/react-native/push/push_display.md +++ b/docs/document/react-native/push/push_display.md @@ -89,7 +89,7 @@ ChatClient.getInstance() :::tip 1. 设置推送模板为推送的高级功能,使用前需要在[环信即时通讯控制台](https://console.easemob.com/user/login)的**即时通讯 > 功能配置 > 功能配置总览**页面激活推送高级功能。如需关闭推送高级功能必须联系商务,因为该操作会删除所有相关配置。 -2. 推送模板相关的数据结构,详见[推送扩展字段](/document/server-side/push_extension.html)。 +2. 推送模板相关的数据结构,详见[推送扩展字段](https://doc.easemob.com/document/server-side/push_extension.html)。 ::: ### 发消息时使用推送模板 diff --git a/docs/document/react-native/push/push_extension.md b/docs/document/react-native/push/push_extension.md index d115e3da..754d900b 100644 --- a/docs/document/react-native/push/push_extension.md +++ b/docs/document/react-native/push/push_extension.md @@ -2,7 +2,7 @@ 你可以利用扩展字段实现自定义推送设置,本文以强制推送和发送静默消息为例介绍如何实现推送扩展功能。 -对于推送扩展字段,详见[离线推送扩展字段文档](/document/server-side/push_extension.html)。 +对于推送扩展字段,详见[离线推送扩展字段文档](https://doc.easemob.com/document/server-side/push_extension.html)。 ## 设置自定义推送字段