Update dependencies and remove old matterclient lib (#2067)

This commit is contained in:
Wim
2023-08-05 20:43:19 +02:00
committed by GitHub
parent 9459495484
commit 56e7bd01ca
772 changed files with 139315 additions and 121315 deletions

View File

@@ -57,7 +57,7 @@ func (cli *Client) CreateGroup(req ReqCreateGroup) (*types.GroupInfo, error) {
}
}
if req.CreateKey == "" {
req.CreateKey = GenerateMessageID()
req.CreateKey = cli.GenerateMessageID()
}
if req.IsParent {
if req.DefaultMembershipApprovalMode == "" {
@@ -99,7 +99,7 @@ func (cli *Client) CreateGroup(req ReqCreateGroup) (*types.GroupInfo, error) {
func (cli *Client) UnlinkGroup(parent, child types.JID) error {
_, err := cli.sendGroupIQ(context.TODO(), iqSet, parent, waBinary.Node{
Tag: "unlink",
Attrs: waBinary.Attrs{"unlink_type": types.GroupLinkChangeTypeSub},
Attrs: waBinary.Attrs{"unlink_type": string(types.GroupLinkChangeTypeSub)},
Content: []waBinary.Node{{
Tag: "group",
Attrs: waBinary.Attrs{"jid": child},
@@ -116,7 +116,7 @@ func (cli *Client) LinkGroup(parent, child types.JID) error {
Tag: "links",
Content: []waBinary.Node{{
Tag: "link",
Attrs: waBinary.Attrs{"link_type": types.GroupLinkChangeTypeSub},
Attrs: waBinary.Attrs{"link_type": string(types.GroupLinkChangeTypeSub)},
Content: []waBinary.Node{{
Tag: "group",
Attrs: waBinary.Attrs{"jid": child},
@@ -221,7 +221,7 @@ func (cli *Client) SetGroupName(jid types.JID, name string) error {
//
// The previousID and newID fields are optional. If the previous ID is not specified, this will
// automatically fetch the current group info to find the previous topic ID. If the new ID is not
// specified, one will be generated with GenerateMessageID().
// specified, one will be generated with Client.GenerateMessageID().
func (cli *Client) SetGroupTopic(jid types.JID, previousID, newID, topic string) error {
if previousID == "" {
oldInfo, err := cli.GetGroupInfo(jid)
@@ -231,7 +231,7 @@ func (cli *Client) SetGroupTopic(jid types.JID, previousID, newID, topic string)
previousID = oldInfo.TopicID
}
if newID == "" {
newID = GenerateMessageID()
newID = cli.GenerateMessageID()
}
attrs := waBinary.Attrs{
"id": newID,