瀏覽代碼

昵称添加

WH01243 1 周之前
父節點
當前提交
29c97cd8b6
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      client/service/wx.go

+ 3 - 0
client/service/wx.go

@@ -197,6 +197,9 @@ func userJudge(c *wcf.RpcContact) (bool, string, string) {
 
 // 发送文本信息
 func sendText(content, wxId, appellation string) (bool, error) {
+	if appellation != "" {
+		content = fmt.Sprintf("%s,%s", appellation, content)
+	}
 	if app.WxClient.SendTxt(content, wxId, nil) != 0 {
 		return false, fmt.Errorf(fmt.Sprintf("%s%s文字消息发送失败", content, wxId))
 	}