INNER CODE UNIT · Go

GenerateWABinary

krypton-byte/neonize · goneonize/main.go:160

func GenerateWABinary(ctx context.Context, to types.JID, msg *waE2E.Message) *[]waBinary.Node {
	isPrivate := to.Server == types.DefaultUserServer
	nodes := make([]waBinary.Node, 0)

	switch getButtonTypeFromMessage(msg) {
	case "interactive":
		im := msg.InteractiveMessage
		if im != nil {
			if nfWrap, ok := im.InteractiveMessage.(*waE2E.InteractiveMessage_NativeFlowMessage_); ok {
				nf := nfWrap.NativeFlowMessage
				if nf != nil && len(nf.Buttons) > 0 {
					for _, b := range nf.Buttons {
						if b == nil || b.Name == nil {
							continue
						}

						name := *b.Name

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…