Skip to content
New issue

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

#588: Add new massages type & update Readme.md #593

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Ased2235
Copy link

@Ased2235 Ased2235 commented Jul 10, 2021

Added new ListMessage, ListResponseMessage Handers. Update the readme.md with new handler. Added new example
#567 #588 @beshoo Check & marge.

image

image

@beshoo
Copy link
Collaborator

beshoo commented Jul 10, 2021

Great, I wll give it 48 hours, you may want to add something, just to make sure it is final.

…list message, add new struct in message.go to make list message easy to send
Copy link
Author

@Ased2235 Ased2235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

examples/sendListMessage/main.go Outdated Show resolved Hide resolved
@Ased2235
Copy link
Author

@beshoo You may marge it now, this is final as i'm busy for awhile after this!

@@ -1992,7 +1992,7 @@ type ListMessage_ListMessageListType int32

const (
ListMessage_UNKNOWN ListMessage_ListMessageListType = 0
ListMessage_SINGLE_SELECT ListMessage_ListMessageListType = 1
ListMessage_SINGLE_SELECT ListMessage_ListMessageListType = 1 // It's here
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beshoo it's here?

@Valdenirmezadri
Copy link

Hello

I followed the example, but the message is not sent

WhatsApp Image 2021-07-13 at 18 26 26

code:

previousMessage := "teste"
quotedMessage := proto.Message{
Conversation: &previousMessage,
}

ContextInfo := whatsapp.ContextInfo{
	QuotedMessage:   &quotedMessage,
	QuotedMessageID: "3EB032DF7237E311B457",        //Original message ID
	Participant:     "5547XXXXXXXX@s.whatsapp.net", //Who sent the original message
}

var Section = []whatsapp.Section{
	{
		Title: "Section title 1",
		Rows: []whatsapp.Row{
			{
				Title:       "Row title 1",
				Description: "Row description 1",
				RowId:       "1C61A9BB7F063EEFE235", // no white space in rowid
			},
			{
				Title:       "Row title 2",
				Description: "Row description 2",
				RowId:       "1C61A9BB7F063EXFE225",
			},
		},
	},
}
Section = append(Section, whatsapp.Section{
	Title: "Section title 2",
	Rows: []whatsapp.Row{
		{
			Title:       "Row title 3",
			Description: "Row description 3",
			RowId:       "1C6149BB7F063EEFE225",
		},
	},
},
)

msg := whatsapp.ListMessage{
	Info: whatsapp.MessageInfo{
		RemoteJid: "5547XXXXXXXX-1586836369@g.us",
	},
	ContextInfo: ContextInfo,
	Title:       "This is List *title*",
	Description: "This is List _description_",
	ButtonText:  "This is List buttonText", // ButtonText dosn't support html tag
	FooterText:  "This is List footerText", // this isn't actually showing in whatsapp web
	ListType:    proto.ListMessage_SINGLE_SELECT,
	Sections:    Section,
}

@jairforero
Copy link

I also have that error, any solution?, message not sent in whatsapp bussiness

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants