message

package
v0.0.0-...-f7f6175 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PrivateMessage received private message identifier
	PrivateMessage = "s.whatsapp.net"
	// GroupMessage received group message identifier
	GroupMessage = "g.us"
	// BroadcastMessage received broadcasts message identifier
	BroadcastMessage = "broadcast"
	// ContactMessage received contact private message identifier
	ContactMessage = "c.us"
)

Variables

This section is empty.

Functions

func GetRemoteHost

func GetRemoteHost(remoteJID string) string

GetRemoteHost get the message host ex 629731239383

func GetRemoteIdentifier

func GetRemoteIdentifier(remoteJID string) string

GetRemoteIdentifier get the message identifier ex: group message, private message...

func GetRemoteJID

func GetRemoteJID(msg whatsapp.TextMessage) string

GetRemoteJID get it

func GetSenderJID

func GetSenderJID(msg whatsapp.TextMessage) string

GetSenderJID is used to get the JId

func GetSenderNumber

func GetSenderNumber(msg whatsapp.TextMessage) string

GetSenderNumber get sender info based on messsage

func Reply

func Reply(text string, wac *whatsapp.Conn, msg whatsapp.TextMessage) error

Reply send message to the sender

func ReplyImg

func ReplyImg(img io.Reader, wac *whatsapp.Conn, msg whatsapp.TextMessage) error

ReplyImg send image to the sender

func Send

func Send(text string, wac *whatsapp.Conn, msg whatsapp.TextMessage) error

Send send message to the sender

func SendTo

func SendTo(remoteJId, text string, wac *whatsapp.Conn) error

SendTo send message to the sender

func ValidateRemoteJID

func ValidateRemoteJID(remoteJID string) bool

ValidateRemoteJID ...

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL