go v3.7.0.30.25

This commit is contained in:
danbai 2023-05-07 10:53:06 +08:00
parent cba52e8232
commit 11c0c154ee
2 changed files with 8 additions and 6 deletions

View File

@ -136,15 +136,17 @@ func (c *Client) ExecDBQuery(db, sql string) []*DbRow {
/*AcceptFriend 接收好友请求 /*AcceptFriend 接收好友请求
* 接收好友请求 * 接收好友请求
* *
* @param v3 xml.attrib["encryptusername"] * @param v3 xml.attrib["encryptusername"] // 加密的用户名
* @param v4 xml.attrib["ticket"] * @param v4 xml.attrib["ticket"] // Ticket
* @param scene 17 // 添加方式17 名片30 扫码
*/ */
func (c *Client) AcceptFriend(v3, v4 string) int32 { func (c *Client) AcceptFriend(v3, v4 string, scene int32) int32 {
req := genFunReq(Functions_FUNC_ACCEPT_FRIEND) req := genFunReq(Functions_FUNC_ACCEPT_FRIEND)
q := Request_V{ q := Request_V{
V: &Verification{ V: &Verification{
V3: v3, V3: v3,
V4: v4, V4: v4,
Scene: scene,
}} }}
req.Msg = &q req.Msg = &q

View File

@ -112,7 +112,7 @@ func TestAcceptFriend(t *testing.T) {
logs.Err(err) logs.Err(err)
return return
} }
logs.Info(wcf.AcceptFriend("encryptusername", "ticket")) logs.Info(wcf.AcceptFriend("encryptusername", "ticket", 17))
} }
func TestGetUserInfo(t *testing.T) { func TestGetUserInfo(t *testing.T) {
wcf, err := NewWCF("") wcf, err := NewWCF("")