Selaa lähdekoodia

消息增加GetOpenID方法 (#368)

* * 公众号菜单管理,set相关函数,返回btn本身,方便以字面量的方式创建多个菜单,更直观,方便管理

* * golangci-lint fix

* * 获取二维码ticket接口没有往上抛接口错误

* * 增加GetOpenID方法,以获取消息的生产用户openID
GargantuaX 5 vuotta sitten
vanhempi
commit
05907d152e
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      officialaccount/message/message.go

+ 5 - 0
officialaccount/message/message.go

@@ -225,3 +225,8 @@ func (msg *CommonToken) SetCreateTime(createTime int64) {
 func (msg *CommonToken) SetMsgType(msgType MsgType) {
 	msg.MsgType = msgType
 }
+
+//GetOpenID get the FromUserName value
+func (msg *CommonToken) GetOpenID() string {
+	return string(msg.FromUserName)
+}