Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zhaominxu
Open-IM-Server
提交
b2c2c124
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,发现更多精彩内容 >>
提交
b2c2c124
编写于
1月 15, 2022
作者:
W
wenxu12345
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor code
上级
e4b6b187
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
4 deletion
+16
-4
internal/rpc/msg/friend_notification.go
internal/rpc/msg/friend_notification.go
+11
-1
internal/rpc/msg/send_msg.go
internal/rpc/msg/send_msg.go
+1
-1
pkg/common/constant/constant.go
pkg/common/constant/constant.go
+1
-0
pkg/proto/sdk_ws/ws.proto
pkg/proto/sdk_ws/ws.proto
+3
-2
未找到文件。
internal/rpc/msg/friend_notification.go
浏览文件 @
b2c2c124
...
@@ -9,6 +9,7 @@ import (
...
@@ -9,6 +9,7 @@ import (
open_im_sdk
"Open_IM/pkg/proto/sdk_ws"
open_im_sdk
"Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"Open_IM/pkg/utils"
"encoding/json"
"encoding/json"
"github.com/golang/protobuf/proto"
)
)
//message MemberInfoChangedTips{
//message MemberInfoChangedTips{
...
@@ -75,7 +76,11 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq)
...
@@ -75,7 +76,11 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq)
}
}
var
tips
open_im_sdk
.
TipsComm
var
tips
open_im_sdk
.
TipsComm
tips
.
Detail
,
_
=
json
.
Marshal
(
FriendApplicationProcessedTips
)
tips
.
Detail
,
err
=
proto
.
Marshal
(
&
FriendApplicationProcessedTips
)
if
err
!=
nil
{
log
.
Error
(
req
.
CommID
.
OperationID
,
"Marshal failed "
,
err
.
Error
(),
FriendApplicationProcessedTips
)
return
}
tips
.
DefaultTips
=
fromUserNickname
+
" FriendApplicationProcessedNotification "
+
toUserNickname
tips
.
DefaultTips
=
fromUserNickname
+
" FriendApplicationProcessedNotification "
+
toUserNickname
var
n
NotificationMsg
var
n
NotificationMsg
...
@@ -86,6 +91,11 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq)
...
@@ -86,6 +91,11 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq)
n
.
MsgFrom
=
constant
.
SysMsgType
n
.
MsgFrom
=
constant
.
SysMsgType
n
.
OperationID
=
req
.
CommID
.
OperationID
n
.
OperationID
=
req
.
CommID
.
OperationID
n
.
Content
,
_
=
json
.
Marshal
(
tips
)
n
.
Content
,
_
=
json
.
Marshal
(
tips
)
n
.
Content
,
err
=
proto
.
Marshal
(
&
tips
)
if
err
!=
nil
{
log
.
Error
(
req
.
CommID
.
OperationID
,
"Marshal failed "
,
err
.
Error
(),
tips
)
return
}
Notification
(
&
n
)
Notification
(
&
n
)
}
}
...
...
internal/rpc/msg/send_msg.go
浏览文件 @
b2c2c124
...
@@ -232,7 +232,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i
...
@@ -232,7 +232,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i
type
NotificationMsg
struct
{
type
NotificationMsg
struct
{
SendID
string
SendID
string
RecvID
string
RecvID
string
Content
[]
byte
Content
[]
byte
// open_im_sdk.TipsComm
MsgFrom
int32
MsgFrom
int32
ContentType
int32
ContentType
int32
SessionType
int32
SessionType
int32
...
...
pkg/common/constant/constant.go
浏览文件 @
b2c2c124
...
@@ -45,6 +45,7 @@ const (
...
@@ -45,6 +45,7 @@ const (
GroupMsg
=
201
GroupMsg
=
201
//SysRelated
//SysRelated
FriendApplicationProcessedNotification
=
1201
//AcceptFriendApplicationTip = 201
FriendApplicationProcessedNotification
=
1201
//AcceptFriendApplicationTip = 201
FriendApplicationAddedNotification
=
1202
//AddFriendTip = 202
FriendApplicationAddedNotification
=
1202
//AddFriendTip = 202
FriendAddedNotification
=
1203
FriendAddedNotification
=
1203
...
...
pkg/proto/sdk_ws/ws.proto
浏览文件 @
b2c2c124
...
@@ -75,8 +75,8 @@ message BlackInfo{
...
@@ -75,8 +75,8 @@ message BlackInfo{
}
}
message
GroupRequest
{
message
GroupRequest
{
string
userID
=
1
;
PublicUserInfo
userInfo
=
1
;
string
groupID
=
2
;
GroupInfo
groupInfo
=
2
;
string
handleResult
=
3
;
string
handleResult
=
3
;
string
reqMsg
=
4
;
string
reqMsg
=
4
;
string
handleMsg
=
5
;
string
handleMsg
=
5
;
...
@@ -312,6 +312,7 @@ message FriendApplicationAddedTips{
...
@@ -312,6 +312,7 @@ message FriendApplicationAddedTips{
//FromUserID accept or reject ToUserID
//FromUserID accept or reject ToUserID
message
FriendApplicationProcessedTips
{
message
FriendApplicationProcessedTips
{
FromToUserID
fromToUserID
=
1
;
FromToUserID
fromToUserID
=
1
;
int32
handleResult
=
2
;
}
}
// FromUserID Added a friend ToUserID
// FromUserID Added a friend ToUserID
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录