Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zhaominxu
Open-IM-Server
提交
3ba881f6
O
Open-IM-Server
项目概览
zhaominxu
/
Open-IM-Server
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Open-IM-Server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3ba881f6
编写于
12月 20, 2021
作者:
W
wenxu12345
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pb: open_im_sdk.OfflinePushInfo
上级
e63b3ab0
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
55 addition
and
5 deletion
+55
-5
config/config.yaml
config/config.yaml
+31
-0
internal/rpc/chat/send_msg.go
internal/rpc/chat/send_msg.go
+22
-5
pkg/proto/sdk_ws/ws.proto
pkg/proto/sdk_ws/ws.proto
+2
-0
未找到文件。
config/config.yaml
浏览文件 @
3ba881f6
...
...
@@ -171,6 +171,37 @@ messagecallback:
stateChange
:
switch
:
false
iOSPush
:
pushSound
:
"
xxx"
badgeCount
:
1
notification
:
groupCreated
:
conversation
:
conversationChanged
:
1
unreadCount
:
1
offlinePush
:
switch
:
true
title
:
"
create
group
title"
desc
:
"
create
group
desc"
ext
:
"
create
group
ext"
defaultTips
:
tips
:
"
create
the
group"
# xx create the group
groupInfoChanged
:
conversation
:
conversationChanged
:
1
unreadCount
:
1
offlinePush
:
switch
:
true
title
:
"
group
info
changed
title"
desc
:
"
group
info
changed
desc"
ext
:
"
group
info
changed
ext"
defaultTips
:
tips
:
"
group
info
changed
by"
# group info changed by xx
conversationChanged
:
0
#---------------demo configuration---------------------#
#The following configuration items are applied to openIM Demo configuration
demoswitch
:
true
...
...
internal/rpc/chat/send_msg.go
浏览文件 @
3ba881f6
...
...
@@ -6,6 +6,7 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
http2
"Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
...
...
@@ -203,17 +204,33 @@ type WSToMsgSvrChatMsg struct {
OperationID
string
`protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"`
}
func
CreateGroupNotification
(
SendID
,
RecvID
string
,
tip
open_im_sdk
.
CreateGroupTip
)
{
func
CreateGroupNotification
(
sendID
string
,
creator
im_mysql_model
.
User
,
group
im_mysql_model
.
Group
,
memberList
[]
im_mysql_model
.
GroupMember
)
{
var
msg
WSToMsgSvrChatMsg
msg
.
OperationID
=
utils
.
OperationIDGenerator
()
msg
.
SendID
=
S
endID
msg
.
RecvID
=
RecvID
msg
.
SendID
=
s
endID
msg
.
RecvID
=
group
.
GroupId
msg
.
ContentType
=
constant
.
CreateGroupTip
msg
.
SessionType
=
constant
.
SysMsgType
msg
.
SessionType
=
constant
.
GroupChatType
msg
.
MsgFrom
=
constant
.
SysMsgType
var
groupCreated
open_im_sdk
.
GroupCreatedTips
groupCreated
.
Group
=
&
open_im_sdk
.
GroupInfo
{}
utils
.
CopyStructFields
(
groupCreated
.
Group
,
group
)
groupCreated
.
Creator
=
&
open_im_sdk
.
GroupMemberFullInfo
{}
utils
.
CopyStructFields
(
groupCreated
.
Creator
,
creator
)
for
_
,
v
:=
range
memberList
{
var
groupMemberInfo
open_im_sdk
.
GroupMemberFullInfo
utils
.
CopyStructFields
(
&
groupMemberInfo
,
v
)
groupCreated
.
MemberList
=
append
(
groupCreated
.
MemberList
,
&
groupMemberInfo
)
}
var
tips
open_im_sdk
.
TipsComm
tips
.
Detail
=
utils
.
StructToJsonString
(
groupCreated
)
tips
.
DefaultTips
=
creator
.
Name
+
" "
+
config
.
Config
.
DefaultTips
.
GroupCreatedTips
msg
.
Content
=
utils
.
StructToJsonString
(
tips
)
Notification
(
&
msg
,
false
)
}
func
Notification
(
m
*
WSToMsgSvrChatMsg
,
onlineUserOnly
bool
,
offlineInfo
open_im_sdk
.
OfflinePushInfo
)
{
func
Notification
(
m
*
WSToMsgSvrChatMsg
,
onlineUserOnly
bool
)
{
}
...
...
pkg/proto/sdk_ws/ws.proto
浏览文件 @
3ba881f6
...
...
@@ -91,6 +91,8 @@ message OfflinePushInfo{
string
Title
=
1
;
string
Desc
=
2
;
string
Ext
=
3
;
string
PushSound
=
4
;
bool
ISBadgeCount
=
5
;
}
message
GroupInfoTip
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录