You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tool/services/wecom/message/text.go

36 lines
576 B

package message
type TextReq struct {
BaseReq
Text Text `json:"text"`
Safe int `json:"safe"`
EnableIdTrans int `json:"enable_id_trans"`
}
type Text struct {
Content string `json:"content"`
}
func (t TextReq) name() string {
return "文本消息"
}
func NewTextReq(toUser, toParty, toTag, content string, agentId int) TextReq {
return TextReq{
BaseReq: BaseReq{
Touser: toUser,
Toparty: toParty,
Totag: toTag,
Msgtype: "text",
Agentid: agentId,
},
Text: Text{
Content: content,
},
Safe: 0,
EnableIdTrans: 0,
}
}