From 1f8e8aa1d6a223326f9b7f1b6dd50b7526799285 Mon Sep 17 00:00:00 2001 From: yoneyan Date: Wed, 17 Mar 2021 22:36:55 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20#55=20(=E5=90=8D=E5=89=8D=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E6=A9=9F=E8=83=BD=E3=81=AE=E8=BF=BD=E5=8A=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/api/core/support/ticket/v0/ticket.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/api/core/support/ticket/v0/ticket.go b/pkg/api/core/support/ticket/v0/ticket.go index 84f6e15d..334a9042 100644 --- a/pkg/api/core/support/ticket/v0/ticket.go +++ b/pkg/api/core/support/ticket/v0/ticket.go @@ -228,10 +228,18 @@ func GetWebSocket(c *gin.Context) { controller.SendChatUser(controllerInterface.Chat{CreatedAt: msg.CreatedAt, UserID: result.User.ID, GroupID: resultGroup.Group.ID, Admin: msg.Admin, Message: msg.Message}) + userName := "不明" + + for _, tmp := range resultGroup.Group.Users { + if tmp.GroupID == result.User.ID { + userName = tmp.Name + } + } + //Slackに送信 attachment := slack.Attachment{} attachment.AddField(slack.Field{Title: "Title", Value: "Support(新規メッセージ)"}). - AddField(slack.Field{Title: "発行者", Value: strconv.Itoa(int(result.User.ID))}). + AddField(slack.Field{Title: "発行者", Value: strconv.Itoa(int(result.User.ID)) + "-" + userName}). AddField(slack.Field{Title: "Group", Value: strconv.Itoa(int(result.Group.ID)) + "-" + result.Group.Org}). AddField(slack.Field{Title: "Title", Value: ticketResult.Ticket[0].Title}). AddField(slack.Field{Title: "Message", Value: msg.Message})