We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i'm trying to add member using UpdateGroupParticipants everything works fine but if member set privately it won't work nor i got any error response.
IDs := make(map[types.JID]whatsmeow.ParticipantChange) IDs[user.JID] = whatsmeow.ParticipantChangeAdd gid, _ := parseJID(message.Info.RemoteJid) d, err := Was().UpdateGroupParticipants(gid, IDs) if err != nil { Log.Errorf("Error adding participants to group: %v", err) return } Log.Infof("Added participants to group: %v", (d.Join)) // -> res ["[email protected]"] `
The text was updated successfully, but these errors were encountered:
you can send GroupInviteMessage, if the user set private
IDs := make(map[waTypes.JID]whatsmeow.ParticipantChange) target, _ := waTypes.ParseJID(strings.Split(v.Message.GetConversation(), " ")[1]) // particicpant to add IDs[target] = whatsmeow.ParticipantChangeAdd mycli.WAClient.GetGroupInviteLink(v.Info.Chat, false) add, _ := mycli.WAClient.UpdateGroupParticipants(v.Info.Chat, IDs) addTag := add.GetChildByTag("add") rest := addTag.GetChildByTag("participant") errorCode := rest.Attrs["error"].(string) if errorCode == "403" { add_req := rest.GetChildByTag("add_request") code := add_req.Attrs["code"].(string) expCode := add_req.Attrs["expiration"].(string) exp, _ := strconv.ParseInt(expCode, 10, 64) groupInfo, _ := mycli.WAClient.GetGroupInfo(v.Info.Chat) groupJid := v.Info.Chat.String() caption := "TEST WHATSMEOW" mycli.WAClient.SendMessage(context.Background(), target, &waProto.Message{ GroupInviteMessage: &waProto.GroupInviteMessage{ InviteCode: &code, InviteExpiration: &exp, GroupJid: &groupJid, GroupName: &groupInfo.Name, Caption: &caption, // JpegThumbnail: , }, },) }
Sorry, something went wrong.
No branches or pull requests
i'm trying to add member using UpdateGroupParticipants everything works fine but if member set privately it won't work nor i got any error response.
The text was updated successfully, but these errors were encountered: