Commit 699d2a1c by chenxianqi

推荐项目

parent b6e64b63
...@@ -5,8 +5,8 @@ httpport = 8080 ...@@ -5,8 +5,8 @@ httpport = 8080
copyrequestbody = true copyrequestbody = true
viewspath = "public" viewspath = "public"
# 用于本地服务今天地址 # 用于本地服务静态资源地址
static_host = "http://localhost:8080/static/uploads/images" static_host = "http://localhost:8080"
# 进程监控 # 进程监控
EnableAdmin = false EnableAdmin = false
......
...@@ -64,7 +64,7 @@ func (c *MessageController) List() { ...@@ -64,7 +64,7 @@ func (c *MessageController) List() {
} }
// push notify update current service contacts list // push notify update current service contacts list
// 待处理888 推送给客的的聊天列表 // 待处理888 推送给客的的聊天列表
// if len(robotlbrary.Robots) > 0 { // if len(robotlbrary.Robots) > 0 {
// robotlbrary.PushNewContacts(auth.UID, robotlbrary.Robots[0]) // robotlbrary.PushNewContacts(auth.UID, robotlbrary.Robots[0])
// } // }
...@@ -166,7 +166,7 @@ func (c *MessageController) Transfer() { ...@@ -166,7 +166,7 @@ func (c *MessageController) Transfer() {
// 待处理888 发送消息 // 待处理888 发送消息
// robot.SendMessage(strconv.FormatInt(admin.ID, 10), []byte(messageStringOne)) // robot.SendMessage(strconv.FormatInt(admin.ID, 10), []byte(messageStringOne))
utils.MessageInto(message, true) utils.MessageInto(message)
// Send to forwarded customer service // Send to forwarded customer service
...@@ -178,7 +178,7 @@ func (c *MessageController) Transfer() { ...@@ -178,7 +178,7 @@ func (c *MessageController) Transfer() {
// 待处理888 发送消息 // 待处理888 发送消息
// robot.SendMessage(strconv.FormatInt(transferDto.ToAccount, 10), []byte(messageStringTwo)) // robot.SendMessage(strconv.FormatInt(transferDto.ToAccount, 10), []byte(messageStringTwo))
utils.MessageInto(message, true) utils.MessageInto(message)
// send to user // send to user
// message.FromAccount = robot.ID // message.FromAccount = robot.ID
...@@ -191,7 +191,7 @@ func (c *MessageController) Transfer() { ...@@ -191,7 +191,7 @@ func (c *MessageController) Transfer() {
// 待处理888 发送消息 // 待处理888 发送消息
// robot.SendMessage(strconv.FormatInt(transferDto.UserAccount, 10), []byte(messageString3)) // robot.SendMessage(strconv.FormatInt(transferDto.UserAccount, 10), []byte(messageString3))
utils.MessageInto(message, false) utils.MessageInto(message)
// Transfer to the library for counting service times // Transfer to the library for counting service times
servicesStatistical := models.ServicesStatistical{UserAccount: transferDto.UserAccount, ServiceAccount: transferDto.ToAccount, TransferAccount: admin.ID, Platform: user.Platform, CreateAt: time.Now().Unix()} servicesStatistical := models.ServicesStatistical{UserAccount: transferDto.UserAccount, ServiceAccount: transferDto.ToAccount, TransferAccount: admin.ID, Platform: user.Platform, CreateAt: time.Now().Unix()}
......
...@@ -381,7 +381,7 @@ func (c *PublicController) PushMessage() { ...@@ -381,7 +381,7 @@ func (c *PublicController) PushMessage() {
var msgContent []byte var msgContent []byte
msgContent, _ = base64.StdEncoding.DecodeString(pushMessage.Payload) msgContent, _ = base64.StdEncoding.DecodeString(pushMessage.Payload)
utils.StringToInterface(string(msgContent), &getMessage) utils.StringToInterface(string(msgContent), &getMessage)
utils.MessageInto(getMessage, false) utils.MessageInto(getMessage)
c.JSON(configs.ResponseSucess, "push success", nil) c.JSON(configs.ResponseSucess, "push success", nil)
...@@ -426,7 +426,7 @@ func (c *PublicController) Upload() { ...@@ -426,7 +426,7 @@ func (c *PublicController) Upload() {
c.JSON(configs.ResponseFail, "上传失败!", &err) c.JSON(configs.ResponseFail, "上传失败!", &err)
} }
c.JSON(configs.ResponseSucess, "上传成功!", &fileName) c.JSON(configs.ResponseSucess, "上传成功!", "/"+fpath)
} }
// CancelMessage cancel a message // CancelMessage cancel a message
......
...@@ -5,6 +5,11 @@ service Kefu { ...@@ -5,6 +5,11 @@ service Kefu {
rpc GetOnlineAllRobots (Request) returns (Respones) {} rpc GetOnlineAllRobots (Request) returns (Respones) {}
rpc PushMessage (Request) returns (Respones) {} rpc PushMessage (Request) returns (Respones) {}
rpc CancelMessage (Request) returns (Respones) {} rpc CancelMessage (Request) returns (Respones) {}
rpc SearchKnowledgeTitles (Request) returns (Respones) {}
rpc GetOnlineAdmins (Request) returns (Respones) {}
rpc InsertStatistical (Request) returns (Respones) {}
rpc PushNewContacts (Request) returns (Respones) {}
rpc GetKnowledgeBaseWithTitleAndPlatform (Request) returns (Respones) {}
} }
message Respones { message Respones {
string data = 1; string data = 1;
......
...@@ -3,11 +3,12 @@ package grpcs ...@@ -3,11 +3,12 @@ package grpcs
import ( import (
context "context" context "context"
"encoding/base64" "encoding/base64"
"encoding/json"
"kefu_server/models" "kefu_server/models"
"kefu_server/services" "kefu_server/services"
"kefu_server/utils" "kefu_server/utils"
"log"
"net" "net"
"strconv"
"github.com/astaxie/beego/logs" "github.com/astaxie/beego/logs"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
...@@ -29,7 +30,7 @@ func (s *kefuServer) PushMessage(ctx context.Context, in *Request) (*Respones, e ...@@ -29,7 +30,7 @@ func (s *kefuServer) PushMessage(ctx context.Context, in *Request) (*Respones, e
var message models.Message var message models.Message
msgContent, _ := base64.StdEncoding.DecodeString(in.Data) msgContent, _ := base64.StdEncoding.DecodeString(in.Data)
utils.StringToInterface(string(msgContent), &message) utils.StringToInterface(string(msgContent), &message)
utils.MessageInto(message, false) utils.MessageInto(message)
return &Respones{Data: "push success"}, nil return &Respones{Data: "push success"}, nil
} }
...@@ -40,18 +41,63 @@ func (s *kefuServer) CancelMessage(ctx context.Context, in *Request) (*Respones, ...@@ -40,18 +41,63 @@ func (s *kefuServer) CancelMessage(ctx context.Context, in *Request) (*Respones,
// cancel // cancel
messageRepository := services.GetMessageRepositoryInstance() messageRepository := services.GetMessageRepositoryInstance()
_, err := messageRepository.Delete(request) _, err := messageRepository.Delete(request)
logs.Info("messageRepository== ", request)
if err != nil { if err != nil {
logs.Info("grpc CancelMessage err == ", err) logs.Info("grpc CancelMessage err == ", err)
} }
return &Respones{Data: "cancel message success"}, nil return &Respones{Data: "cancel message success"}, nil
} }
// SearchKnowledgeTitles
func (s *kefuServer) SearchKnowledgeTitles(ctx context.Context, in *Request) (*Respones, error) {
var request models.KnowledgeBaseTitleRequestDto
utils.StringToInterface(in.Data, &request)
knowledgeBaseRepository := services.GetKnowledgeBaseRepositoryInstance()
titles := knowledgeBaseRepository.SearchKnowledgeTitles(request)
return &Respones{Data: utils.InterfaceToString(titles)}, nil
}
// GetOnlineAdmins
func (s *kefuServer) GetOnlineAdmins(ctx context.Context, in *Request) (*Respones, error) {
adminRepository := services.GetAdminRepositoryInstance()
admins := adminRepository.GetOnlineAdmins()
return &Respones{Data: utils.InterfaceToString(admins)}, nil
}
// PushNewContacts
func (s *kefuServer) PushNewContacts(ctx context.Context, in *Request) (*Respones, error) {
uid, _ := strconv.ParseInt(in.Data, 10, 64)
utils.PushNewContacts(uid)
return &Respones{Data: "PushNewContacts success"}, nil
}
// InsertStatistical
func (s *kefuServer) InsertStatistical(ctx context.Context, in *Request) (*Respones, error) {
var servicesStatistical models.ServicesStatistical
utils.StringToInterface(in.Data, &servicesStatistical)
statisticalRepository := services.GetStatisticalRepositoryInstance()
_, err := statisticalRepository.Add(&servicesStatistical)
if err != nil {
logs.Info("InsertStatistical err == ", err)
}
return &Respones{Data: "insert success"}, nil
}
// GetKnowledgeBaseWithTitle
func (s *kefuServer) GetKnowledgeBaseWithTitleAndPlatform(ctx context.Context, in *Request) (*Respones, error) {
request := make(map[string]string)
json.Unmarshal([]byte(in.Data), &request)
knowledgeBaseRepository := services.GetKnowledgeBaseRepositoryInstance()
platform, _ := strconv.ParseInt(request["platform"], 10, 64)
knowledgeBase := knowledgeBaseRepository.GetKnowledgeBaseWithTitleAndPlatform(request["title"], platform)
return &Respones{Data: utils.InterfaceToString(knowledgeBase)}, nil
}
// Run run grpc server // Run run grpc server
func Run() { func Run() {
lis, err := net.Listen("tcp", ":8028") lis, err := net.Listen("tcp", ":8028")
if err != nil { if err != nil {
log.Fatalf("grpc server failed: %v", err) logs.Info("grpc server failed: %v", err)
} }
s := grpc.NewServer() s := grpc.NewServer()
RegisterKefuServer(s, &kefuServer{}) RegisterKefuServer(s, &kefuServer{})
......
...@@ -34,7 +34,7 @@ func initLog() { ...@@ -34,7 +34,7 @@ func initLog() {
} }
func main() { func main() {
end := make(chan bool, 1)
// init db // init db
db.Run() db.Run()
...@@ -60,4 +60,5 @@ func main() { ...@@ -60,4 +60,5 @@ func main() {
// run application // run application
beego.Run() beego.Run()
<-end
} }
package models
// KnowledgeBaseTitleDto struct
type KnowledgeBaseTitleDto struct {
Title string `json:"title"`
}
// KnowledgeBaseTitleRequestDto struct
type KnowledgeBaseTitleRequestDto struct {
Payload string `json:"payload"`
KeyWords string `json:"keyWords"`
IsSerachSub bool `json:"isSerachSub"`
Platform int64 `json:"platform"`
Limit int64 `json:"limit"`
}
...@@ -15,6 +15,7 @@ type AdminRepositoryInterface interface { ...@@ -15,6 +15,7 @@ type AdminRepositoryInterface interface {
Add(admin *models.Admin, col1 string) (bool, int64, error) Add(admin *models.Admin, col1 string) (bool, int64, error)
Delete(id int64) (int64, error) Delete(id int64) (int64, error)
GetAdmins(request *AdminPaginationDto) (*AdminPaginationDto, error) GetAdmins(request *AdminPaginationDto) (*AdminPaginationDto, error)
GetOnlineAdmins() []models.Admin
CheckAdminsLoginTimeOutAndSetOffline(lastMessageUnixTimer int64) int64 CheckAdminsLoginTimeOutAndSetOffline(lastMessageUnixTimer int64) int64
} }
...@@ -85,6 +86,17 @@ func (r *AdminRepository) Update(id int64, params orm.Params) (int64, error) { ...@@ -85,6 +86,17 @@ func (r *AdminRepository) Update(id int64, params orm.Params) (int64, error) {
return index, err return index, err
} }
// GetOnlineAdmins online all admin
func (r *AdminRepository) GetOnlineAdmins() []models.Admin {
var admins []models.Admin
_, err := r.o.Raw("SELECT a.*, IFNULL(c.count,0) AS `count` FROM admin as a LEFT JOIN (SELECT to_account,COUNT(*) AS count FROM `contact` WHERE is_session_end = 0 GROUP BY to_account) c ON a.id = c.to_account WHERE a.`online` = 1 ORDER BY c.count").QueryRows(&admins)
if err != nil {
logs.Warn("GetOnlineAdmins online all admin------------", err)
return []models.Admin{}
}
return admins
}
// Add create a admin // Add create a admin
func (r *AdminRepository) Add(admin *models.Admin, col1 string) (bool, int64, error) { func (r *AdminRepository) Add(admin *models.Admin, col1 string) (bool, int64, error) {
_bool, index, err := r.o.ReadOrCreate(admin, col1) _bool, index, err := r.o.ReadOrCreate(admin, col1)
......
...@@ -101,7 +101,7 @@ func (r *ContactRepository) GetContacts(uid int64) ([]models.ContactDto, error) ...@@ -101,7 +101,7 @@ func (r *ContactRepository) GetContacts(uid int64) ([]models.ContactDto, error)
_, err := r.o.Raw("SELECT c.id AS cid,c.to_account,c.is_session_end, c.last_message,c.last_message_type,c.from_account, c.create_at AS contact_create_at,u.*, IFNULL(m.`count`,0) AS `read` FROM `contact` c LEFT JOIN `user` u ON c.from_account = u.id LEFT JOIN (SELECT to_account,from_account, COUNT(*) as `count` FROM message WHERE `read` = 1 GROUP BY to_account,from_account) m ON m.to_account = c.to_account AND m.from_account = c.from_account WHERE c.to_account = ? AND c.delete = 0 ORDER BY c.create_at DESC", uid).QueryRows(&contactDto) _, err := r.o.Raw("SELECT c.id AS cid,c.to_account,c.is_session_end, c.last_message,c.last_message_type,c.from_account, c.create_at AS contact_create_at,u.*, IFNULL(m.`count`,0) AS `read` FROM `contact` c LEFT JOIN `user` u ON c.from_account = u.id LEFT JOIN (SELECT to_account,from_account, COUNT(*) as `count` FROM message WHERE `read` = 1 GROUP BY to_account,from_account) m ON m.to_account = c.to_account AND m.from_account = c.from_account WHERE c.to_account = ? AND c.delete = 0 ORDER BY c.create_at DESC", uid).QueryRows(&contactDto)
if err != nil { if err != nil {
logs.Warn("GetContacts get Contacts------------", err) logs.Warn("GetContacts get Contacts------------", err)
return nil, err return []models.ContactDto{}, err
} }
// content base 64 decode // content base 64 decode
for index, contact := range contactDto { for index, contact := range contactDto {
......
...@@ -16,6 +16,8 @@ type KnowledgeBaseRepositoryInterface interface { ...@@ -16,6 +16,8 @@ type KnowledgeBaseRepositoryInterface interface {
Add(knowledgeBase *models.KnowledgeBase, col1 string) (bool, int64, error) Add(knowledgeBase *models.KnowledgeBase, col1 string) (bool, int64, error)
Update(id int64, params *orm.Params) (int64, error) Update(id int64, params *orm.Params) (int64, error)
Delete(id int64) (int64, error) Delete(id int64) (int64, error)
SearchKnowledgeTitles(request models.KnowledgeBaseTitleRequestDto) []models.KnowledgeBaseTitleDto
GetKnowledgeBaseWithTitleAndPlatform(title string, platform int64) *models.KnowledgeBase
} }
// KnowledgeBaseRepository struct // KnowledgeBaseRepository struct
...@@ -43,6 +45,43 @@ func (r *KnowledgeBaseRepository) Add(knowledgeBase *models.KnowledgeBase, col1 ...@@ -43,6 +45,43 @@ func (r *KnowledgeBaseRepository) Add(knowledgeBase *models.KnowledgeBase, col1
return _bool, index, err return _bool, index, err
} }
// SearchKnowledgeTitles Search Knowledge Titles
// payload = "key1"
// keyWords = "key1|key2|key3"
func (r *KnowledgeBaseRepository) SearchKnowledgeTitles(request models.KnowledgeBaseTitleRequestDto) []models.KnowledgeBaseTitleDto {
if request.Payload == "" {
return []models.KnowledgeBaseTitleDto{}
}
var knowledgeBaseTitleDto []models.KnowledgeBaseTitleDto
subTitle := ""
fields := "title"
if request.IsSerachSub {
fields = "title,sub_title"
}
roobtKeyWords := strings.Split(strings.Trim(request.KeyWords, "|"), "|")
if request.KeyWords == "" {
subTitle := ""
for _, value := range roobtKeyWords {
if strings.Contains(value, request.Payload) {
subTitle += subTitle + " sub_title LIKE \"%" + value + "%\" OR "
}
}
}
if request.IsSerachSub && request.KeyWords != "" {
for _, value := range roobtKeyWords {
subTitle += " sub_title LIKE \"%" + value + "%\" OR "
}
}
subTitle += " sub_title LIKE \"%" + request.Payload + "%\" "
_, err := r.o.Raw("SELECT "+fields+" FROM knowledge_base WHERE ( "+subTitle+" ) AND platform IN (?,?) ORDER by rand() limit ?", 1, request.Platform, request.Limit).QueryRows(&knowledgeBaseTitleDto)
if err != nil {
logs.Warn("Search Knowledge Titles------------", err)
return []models.KnowledgeBaseTitleDto{}
}
return knowledgeBaseTitleDto
}
// Update knowledgeBase // Update knowledgeBase
func (r *KnowledgeBaseRepository) Update(id int64, params orm.Params) (int64, error) { func (r *KnowledgeBaseRepository) Update(id int64, params orm.Params) (int64, error) {
index, err := r.q.Filter("id", id).Update(params) index, err := r.q.Filter("id", id).Update(params)
...@@ -108,6 +147,17 @@ func (r *KnowledgeBaseRepository) GetKnowledgeBaseWithTitle(title string) *model ...@@ -108,6 +147,17 @@ func (r *KnowledgeBaseRepository) GetKnowledgeBaseWithTitle(title string) *model
return &base return &base
} }
// GetKnowledgeBaseWithTitleAndPlatform get one KnowledgeBase with title and platform
func (r *KnowledgeBaseRepository) GetKnowledgeBaseWithTitleAndPlatform(title string, platform int64) *models.KnowledgeBase {
var knowledge models.KnowledgeBase
if err := r.q.Filter("title", title).Filter("platform__in", 1, platform).One(&knowledge); err != nil {
logs.Warn("GetKnowledgeBaseWithTitle get one KnowledgeBase with title------------", err)
return nil
}
knowledge.SubTitle = strings.Trim(knowledge.SubTitle, "|")
return &knowledge
}
// Delete delete a KnowledgeBase // Delete delete a KnowledgeBase
func (r *KnowledgeBaseRepository) Delete(id int64) (int64, error) { func (r *KnowledgeBaseRepository) Delete(id int64) (int64, error) {
index, err := r.q.Filter("id", id).Delete() index, err := r.q.Filter("id", id).Delete()
......
...@@ -63,7 +63,7 @@ func appTask() { ...@@ -63,7 +63,7 @@ func appTask() {
message.ToAccount = contact.ToAccount message.ToAccount = contact.ToAccount
messageString = utils.InterfaceToString(message) messageString = utils.InterfaceToString(message)
utils.PushMessage(contact.ToAccount, messageString) utils.PushMessage(contact.ToAccount, messageString)
utils.MessageInto(message, true) utils.MessageInto(message)
// Message after timeout // Message after timeout
if robot.TimeoutText != "" { if robot.TimeoutText != "" {
......
...@@ -59,7 +59,8 @@ func HTTPRequest(path string, method string, data interface{}, token string) *HT ...@@ -59,7 +59,8 @@ func HTTPRequest(path string, method string, data interface{}, token string) *HT
if err != nil { if err != nil {
response.Code = 500 response.Code = 500
response.Message = "链接错误" response.Message = "链接错误"
logs.Error(err) logs.Error("链接错误====err", err)
return nil
} }
req.Header.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8") req.Header.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
req.Header.Add("Accept-Language", "zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3") req.Header.Add("Accept-Language", "zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3")
...@@ -70,12 +71,17 @@ func HTTPRequest(path string, method string, data interface{}, token string) *HT ...@@ -70,12 +71,17 @@ func HTTPRequest(path string, method string, data interface{}, token string) *HT
req.Header.Set("Authorization", token) req.Header.Set("Authorization", token)
req.Header.Set("usertype", "cmp_app") req.Header.Set("usertype", "cmp_app")
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil {
response.Code = 502
response.Message = "链接错误:" + err.Error()
return response
}
response.Code = resp.StatusCode response.Code = resp.StatusCode
defer resp.Body.Close() defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) body, err := ioutil.ReadAll(resp.Body)
if err != nil { if err != nil {
response.Code = 400 response.Code = 502
response.Message = "请求错误" response.Message = "读取数据错处:" + err.Error()
return response return response
} }
if resp.StatusCode != 200 { if resp.StatusCode != 200 {
...@@ -84,6 +90,5 @@ func HTTPRequest(path string, method string, data interface{}, token string) *HT ...@@ -84,6 +90,5 @@ func HTTPRequest(path string, method string, data interface{}, token string) *HT
return response return response
} }
json.Unmarshal(body, response) json.Unmarshal(body, response)
// response.Data = string(body)
return response return response
} }
...@@ -10,10 +10,10 @@ import ( ...@@ -10,10 +10,10 @@ import (
) )
// MessageInto push message // MessageInto push message
func MessageInto(message models.Message, isKF bool) { func MessageInto(message models.Message) {
// 不处理的类型 // 不处理的类型
if message.BizType == "contacts" || message.BizType == "pong" || message.BizType == "welcome" || message.BizType == "into" || message.BizType == "search_knowledge" { if message.BizType == "contacts" || message.BizType == "handshake" || message.BizType == "pong" || message.BizType == "welcome" || message.BizType == "into" || message.BizType == "search_knowledge" {
return return
} }
...@@ -26,13 +26,12 @@ func MessageInto(message models.Message, isKF bool) { ...@@ -26,13 +26,12 @@ func MessageInto(message models.Message, isKF bool) {
// content内容转base64 // content内容转base64
message.Payload = base64.StdEncoding.EncodeToString([]byte(message.Payload)) message.Payload = base64.StdEncoding.EncodeToString([]byte(message.Payload))
// 过滤掉下面类型的消息不入库
if !(message.BizType == "handshake") {
if !isKF {
// UserRepository instance // UserRepository instance
userRepository := services.GetUserRepositoryInstance() userRepository := services.GetUserRepositoryInstance()
user := userRepository.GetUser(message.ToAccount)
// 接收者是用户
if user != nil {
// 默认已读消息 // 默认已读消息
message.Read = 0 message.Read = 0
...@@ -43,6 +42,7 @@ func MessageInto(message models.Message, isKF bool) { ...@@ -43,6 +42,7 @@ func MessageInto(message models.Message, isKF bool) {
if user != nil && user.IsWindow == 0 { if user != nil && user.IsWindow == 0 {
message.Read = 1 message.Read = 1
} }
} }
// message.BizType == "end" is not read // message.BizType == "end" is not read
...@@ -53,8 +53,6 @@ func MessageInto(message models.Message, isKF bool) { ...@@ -53,8 +53,6 @@ func MessageInto(message models.Message, isKF bool) {
// 消息入库 // 消息入库
_, _ = messageRepository.Add(&message) _, _ = messageRepository.Add(&message)
}
// RobotRepository instance // RobotRepository instance
robotRepository := services.GetRobotRepositoryInstance() robotRepository := services.GetRobotRepositoryInstance()
......
package utils
import (
"encoding/base64"
"encoding/json"
"kefu_server/models"
"kefu_server/services"
"time"
)
// PushNewContacts 推送最新聊天列表给客服
func PushNewContacts(uid int64) {
contactData, _ := services.GetContactRepositoryInstance().GetContacts(uid)
// 消息体
message := models.Message{}
message.BizType = "contacts"
message.FromAccount = 1
message.Timestamp = time.Now().Unix()
for index, contact := range contactData {
payload, _ := base64.StdEncoding.DecodeString(contact.LastMessage)
contactData[index].LastMessage = string(payload)
}
message.ToAccount = uid
messageContentByte, _ := json.Marshal(contactData)
message.Payload = string(messageContentByte)
PushMessage(uid, InterfaceToString(message))
}
...@@ -30,7 +30,6 @@ func PushMessage(toAccount int64, msg string) bool { ...@@ -30,7 +30,6 @@ func PushMessage(toAccount int64, msg string) bool {
fmt.Println(response) fmt.Println(response)
return false return false
} }
return true return true
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment