1
1
package workMoments
2
2
3
3
import (
4
- "github.com/golang/protobuf/proto"
5
4
ws "open_im_sdk/internal/interaction"
6
5
"open_im_sdk/open_im_sdk_callback"
7
6
"open_im_sdk/pkg/common"
8
7
"open_im_sdk/pkg/db"
9
8
"open_im_sdk/pkg/log"
10
9
"open_im_sdk/pkg/sdk_params_callback"
11
- "open_im_sdk/pkg/server_api_params"
12
10
"open_im_sdk/pkg/utils"
13
11
)
14
12
@@ -23,14 +21,9 @@ func NewWorkMoments(loginUserID string, db *db.DataBase, p *ws.PostApi) *WorkMom
23
21
return & WorkMoments {loginUserID : loginUserID , db : db , p : p }
24
22
}
25
23
26
- func (w * WorkMoments ) DoNotification (msg * server_api_params.MsgData , operationID string ) {
27
- log .NewInfo (operationID , utils .GetSelfFuncName (), string (msg .Content ))
28
- var tips server_api_params.TipsComm
29
- if err := proto .Unmarshal (msg .Content , & tips ); err != nil {
30
- log .NewError (operationID , utils .GetSelfFuncName (), err .Error ())
31
- }
32
- log .NewInfo (operationID , utils .GetSelfFuncName (), "json_detail: " , tips .JsonDetail )
33
- if err := w .db .InsertWorkMomentsNotification (tips .JsonDetail ); err != nil {
24
+ func (w * WorkMoments ) DoNotification (jsonDetailStr string , operationID string ) {
25
+ log .NewInfo (operationID , utils .GetSelfFuncName (), "json_detail: " , jsonDetailStr )
26
+ if err := w .db .InsertWorkMomentsNotification (jsonDetailStr ); err != nil {
34
27
log .NewError (operationID , utils .GetSelfFuncName (), "InsertWorkMomentsNotification failed" , err .Error ())
35
28
return
36
29
}
0 commit comments