Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
kefu_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
889359fe
authored
Dec 27, 2019
by
chenxianqi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
message body add key
parent
6e023090
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
im/message_p2p.go
main.go
im/message_p2p.go
View file @
889359fe
...
@@ -283,6 +283,7 @@ func MessageP2P(message models.Message) {
...
@@ -283,6 +283,7 @@ func MessageP2P(message models.Message) {
callbackMessage
.
FromAccount
=
message
.
ToAccount
callbackMessage
.
FromAccount
=
message
.
ToAccount
callbackMessage
.
Timestamp
=
time
.
Now
()
.
Unix
()
+
1
callbackMessage
.
Timestamp
=
time
.
Now
()
.
Unix
()
+
1
callbackMessage
.
ToAccount
=
message
.
FromAccount
callbackMessage
.
ToAccount
=
message
.
FromAccount
callbackMessage
.
Key
=
time
.
Now
()
.
Unix
()
callbackMessage
.
Payload
=
messageContent
callbackMessage
.
Payload
=
messageContent
messageJSON
,
_
:=
json
.
Marshal
(
callbackMessage
)
messageJSON
,
_
:=
json
.
Marshal
(
callbackMessage
)
messageString
:=
base64
.
StdEncoding
.
EncodeToString
([]
byte
(
messageJSON
))
messageString
:=
base64
.
StdEncoding
.
EncodeToString
([]
byte
(
messageJSON
))
...
...
main.go
View file @
889359fe
...
@@ -144,6 +144,7 @@ func appTask() {
...
@@ -144,6 +144,7 @@ func appTask() {
message
.
FromAccount
=
appAccount
message
.
FromAccount
=
appAccount
message
.
ToAccount
=
contact
.
FromAccount
message
.
ToAccount
=
contact
.
FromAccount
message
.
BizType
=
"text"
message
.
BizType
=
"text"
message
.
Key
=
time
.
Now
()
.
Unix
()
message
.
Payload
=
robotData
.
TimeoutText
message
.
Payload
=
robotData
.
TimeoutText
messageJSON
,
_
=
json
.
Marshal
(
message
)
messageJSON
,
_
=
json
.
Marshal
(
message
)
messageString
=
base64
.
StdEncoding
.
EncodeToString
([]
byte
(
messageJSON
))
messageString
=
base64
.
StdEncoding
.
EncodeToString
([]
byte
(
messageJSON
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment