File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
<Toc />
4
4
5
+ ## 版本 V1.5.3 Dev 2025-3-17(开发版)
6
+
7
+ ### 新增特性
8
+
9
+ - 新增 [ ContactManager#getContact] ( user_relationship.html#从本地获取好友列表 ) 方法,用于获取本地单个联系人的信息。
10
+
11
+ ### 优化
12
+
13
+ - ` PushListener#onError ` 回调,增加回调 SDK 内部调用系统库 PushKit 获取 push token 失败的信息。
14
+ - 底层长连接使用 poll 代替 select,解决文件描述符(fd)最大数量 1024 的限制问题。
15
+
5
16
## 版本 V1.5.2 Dev 2025-3-10(开发版)
6
17
7
18
### 新增特性
Original file line number Diff line number Diff line change @@ -158,10 +158,25 @@ ChatClient.getInstance().contactManager()?.fetchAllContactsIDFromServer().then(r
158
158
159
159
你可以调用 ` getContactsFromLocal ` 方法一次性获取整个好友列表,其中每个好友对象包含好友的用户 ID 和好友备注。
160
160
161
+ 自 1.5.3 版本开始,你可以调用 ` getContact ` 方法从本地获取单个好友的用户 ID 和好友备注。
162
+
161
163
::: tip
162
164
需要从服务器获取好友列表之后,才能从本地获取到好友列表。
163
165
:::
164
166
167
+ - 本地获取单个好友。
168
+
169
+ ``` typescript
170
+ ChatClient .getInstance ().contactManager ()?.getContact (this .contactId ).then ((contact ) => {
171
+ if (contact ) {
172
+ let remark = contact .remark ();
173
+ let username = contact .userId ();
174
+ }
175
+ }).catch ((e : ChatError ) => {
176
+ // failure logic
177
+ });
178
+ ```
179
+
165
180
- 一次性获取本地好友列表。
166
181
167
182
``` typescript
You can’t perform that action at this time.
0 commit comments