Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-im
比较版本
884e6d2de6017073fd37ef320c3a54715691c008...71ecac6a1e1e661e1573a2e0403f6f9ec04a4fdb
U
uni-im
项目概览
DCloud
/
uni-im
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-im
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
源分支
71ecac6a1e1e661e1573a2e0403f6f9ec04a4fdb
选择Git版本
...
目标分支
884e6d2de6017073fd37ef320c3a54715691c008
选择Git版本
比较
Commits (2)
https://gitcode.net/dcloud/uni-im/-/commit/3dba1e8f15265cea212227bcae56fcb39d5cc09a
更新 去掉可选链,兼容 Nodejs12
2024-11-13T17:56:14+08:00
linju
linju@dcloud.io
https://gitcode.net/dcloud/uni-im/-/commit/71ecac6a1e1e661e1573a2e0403f6f9ec04a4fdb
3.4.38
2024-11-14T16:35:51+08:00
linju
linju@dcloud.io
隐藏空白更改
内联
并排
Showing
7 changed file
with
19 addition
and
16 deletion
+19
-16
changelog.md
changelog.md
+2
-0
package.json
package.json
+2
-2
uniCloud/cloudfunctions/uni-im-co/conversation.js
uniCloud/cloudfunctions/uni-im-co/conversation.js
+2
-2
uniCloud/cloudfunctions/uni-im-co/msg.js
uniCloud/cloudfunctions/uni-im-co/msg.js
+2
-2
uniCloud/cloudfunctions/uni-im-co/push.js
uniCloud/cloudfunctions/uni-im-co/push.js
+1
-1
uniCloud/database/uni-id-users.schema.ext.js
uniCloud/database/uni-id-users.schema.ext.js
+8
-8
uniCloud/database/uni-im-group-member.schema.ext.js
uniCloud/database/uni-im-group-member.schema.ext.js
+2
-1
未找到文件。
changelog.md
浏览文件 @
71ecac6a
## 3.4.38(2024-11-14)
更新 去掉可选链,兼容 Nodejs12
## 3.4.36(2024-11-12)
修复 弱网的情况下,消息含图片等资源上传失败后,点击重发后接收方收到的消息资源错误的问题
更新 查找好友页面不再显示当前用户自己
...
...
package.json
浏览文件 @
71ecac6a
{
"id"
:
"uni-im"
,
"displayName"
:
"uni-im"
,
"version"
:
"3.4.3
6
"
,
"version"
:
"3.4.3
8
"
,
"description"
:
"uni-im是云端一体的、全平台的、免费的、开源即时通讯系统"
,
"keywords"
:
[
"im,即时通讯,客服,聊天"
...
...
@@ -44,7 +44,7 @@
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"
n
"
,
"aliyun"
:
"
y
"
,
"alipay"
:
"y"
},
"client"
:
{
...
...
uniCloud/cloudfunctions/uni-im-co/conversation.js
浏览文件 @
71ecac6a
...
...
@@ -59,10 +59,10 @@ async function getConversationList({
matchObj
.
group_type
=
type
.
group_type
}
}
else
{
action
[
type
]
?.
()
action
[
type
]
&&
action
[
type
]
()
}
// console.error('action========',type,'group_type:'+matchObj
?
.group_type);
// console.error('action========',type,'group_type:'+matchObj.group_type);
}
// 如果指定了会话id,则只查询指定的会话
...
...
uniCloud/cloudfunctions/uni-im-co/msg.js
浏览文件 @
71ecac6a
...
...
@@ -276,7 +276,7 @@ async function _beforeSendMsgActions(params) {
// 如果是扩展的消息类型,由扩展模块执行前置操作
const
{
msgTypes
}
=
require
(
'
uni-im-ext
'
)
let
msgType
=
await
msgTypes
.
get
(
params
.
type
)
if
(
msgType
?
.
beforeSendMsg
)
{
if
(
msgType
&&
msgType
.
beforeSendMsg
)
{
await
msgType
.
beforeSendMsg
(
params
,
this
.
current_uid
)
console
.
error
(
'
############----->beforeSendMsg
'
,
params
)
return
...
...
@@ -555,7 +555,7 @@ async function _createOrUpdateConversation(conversation_id, msgData, chat_source
if
(
msgData
.
group_id
)
{
senderConversation
.
leave
=
false
senderConversation
.
has_unread_group_notification
=
null
senderConversation
.
group_type
=
groupInfo
?
.
type
senderConversation
.
group_type
=
groupInfo
.
type
// 群聊只为当前用户创建会话
await
dbUniImConversation
.
add
(
senderConversation
)
}
else
{
...
...
uniCloud/cloudfunctions/uni-im-co/push.js
浏览文件 @
71ecac6a
...
...
@@ -105,7 +105,7 @@ async function sendPushMsg(param, appId) {
// console.log('pushParam.channel', pushParam.channel)
// 解决没有购买个推vip套餐,设置推送策略为3无效的问题
if
(
pushParam
?.
settings
?
.
strategy
===
3
)
{
if
(
pushParam
.
settings
&&
pushParam
.
settings
.
strategy
===
3
)
{
delete
pushParam
.
title
delete
pushParam
.
content
}
...
...
uniCloud/database/uni-id-users.schema.ext.js
浏览文件 @
71ecac6a
...
...
@@ -14,16 +14,16 @@ module.exports = {
}
async
function
afterReadAction
({
field
,
field
=
''
,
result
,
userInfo
:
currentUserInfo
,
primaryCollection
}
=
{},
asSecondaryCollection
=
false
)
{
const
{
data
}
=
result
const
{
data
}
=
result
if
(
!
Array
.
isArray
(
data
))
{
data
=
[
data
]
}
if
(
!
data
?.
length
)
return
if
(
data
.
length
===
0
)
return
const
isAdmin
=
currentUserInfo
.
role
.
includes
(
'
uni-im-admin
'
)
||
currentUserInfo
.
role
.
includes
(
'
admin
'
)
||
currentUserInfo
.
role
.
includes
(
'
staff
'
)
// 处理当前表被作为联查时的副表的情况
let
userInfos
=
data
...
...
@@ -60,16 +60,16 @@ async function afterReadAction({
}
userInfos
.
forEach
(
item
=>
{
const
real_name
=
item
?.
realname_auth
?.
real_name
const
real_name
=
item
.
realname_auth
?
item
.
realname_auth
.
real_name
:
''
// 如果real_name以uni-im-encrypt:开头
if
(
real_name
?
.
startsWith
(
'
uni-im-encrypt:
'
))
{
if
(
real_name
.
startsWith
(
'
uni-im-encrypt:
'
))
{
// console.error('解密real_name',real_name,item._id)
item
.
realname_auth
.
real_name
=
decrypt
(
real_name
)
// console.error('解密后real_name',item.realname_auth.real_name)
}
})
if
(
field
?
.
includes
(
"
nickname
"
))
{
if
(
field
.
includes
(
"
nickname
"
))
{
//uni-im 处理查询nickname,但值为空的情况
// 记录没有nickname的用户id
const
user_ids
=
userInfos
.
filter
(
item
=>
!
item
.
nickname
).
map
(
item
=>
item
.
_id
)
...
...
@@ -97,11 +97,11 @@ async function afterReadAction({
userInfos
.
forEach
(
item
=>
{
if
(
!
item
.
nickname
)
{
const
userInfo
=
usersInfo
[
item
.
_id
]
const
userInfo
=
usersInfo
[
item
.
_id
]
||
{}
// 管理员可以看到不打码的
if
(
isAdmin
)
{
console
.
log
(
'
userInfo
'
,
userInfo
,
'
item
'
,
item
)
item
.
nickname
=
userInfo
?.
username
||
userInfo
?.
email
||
userInfo
?
.
mobile
item
.
nickname
=
userInfo
.
username
||
userInfo
.
email
||
userInfo
.
mobile
}
else
{
item
.
nickname
=
hideUsernameStr
(
userInfo
.
username
)
||
hideEmailStr
(
userInfo
.
email
)
||
hideMobileStr
(
userInfo
.
mobile
)
...
...
uniCloud/database/uni-im-group-member.schema.ext.js
浏览文件 @
71ecac6a
...
...
@@ -87,7 +87,8 @@ module.exports = {
member_count
:
db
.
command
.
inc
(
1
)
})
await
uniImCo
.
sendMsg
(
msgData
,
user_id
)
if
(
triggerContext
.
groupInfo
?.
type
===
"
dcloud-plugin
"
){
const
{
type
}
=
triggerContext
.
groupInfo
||
{}
if
(
type
===
"
dcloud-plugin
"
){
// 刷新记录在im系统中的 插件订单信息
try
{
console
.
error
(
'
加入了dcloud-plugin
'
,
triggerContext
.
groupInfo
)
...
...