Documentation ¶
Overview ¶
nolint:goconst
Index ¶
- func New(cfg *bridge.Config) bridge.Bridger
- type Bwhatsapp
- func (b *Bwhatsapp) Connect() error
- func (b *Bwhatsapp) Disconnect() error
- func (b *Bwhatsapp) GetProfilePicThumb(jid string) (*ProfilePicInfo, error)
- func (b *Bwhatsapp) HandleAudioMessage(message whatsapp.AudioMessage)
- func (b *Bwhatsapp) HandleDocumentMessage(message whatsapp.DocumentMessage)
- func (b *Bwhatsapp) HandleError(err error)
- func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage)
- func (b *Bwhatsapp) HandleTextMessage(message whatsapp.TextMessage)
- func (b *Bwhatsapp) HandleVideoMessage(message whatsapp.VideoMessage)
- func (b *Bwhatsapp) JoinChannel(channel config.ChannelInfo) error
- func (b *Bwhatsapp) Login() error
- func (b *Bwhatsapp) PostDocumentMessage(msg config.Message, filetype string) (string, error)
- func (b *Bwhatsapp) PostImageMessage(msg config.Message, filetype string) (string, error)
- func (b *Bwhatsapp) Send(msg config.Message) (string, error)
- type ProfilePicInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bwhatsapp ¶
Bwhatsapp Bridge structure keeping all the information needed for relying
func (*Bwhatsapp) Disconnect ¶
Disconnect is called while reconnecting to the bridge Required implementation of the Bridger interface
func (*Bwhatsapp) GetProfilePicThumb ¶
func (b *Bwhatsapp) GetProfilePicThumb(jid string) (*ProfilePicInfo, error)
func (*Bwhatsapp) HandleAudioMessage ¶
func (b *Bwhatsapp) HandleAudioMessage(message whatsapp.AudioMessage)
HandleAudioMessage downloads audio messages
func (*Bwhatsapp) HandleDocumentMessage ¶
func (b *Bwhatsapp) HandleDocumentMessage(message whatsapp.DocumentMessage)
HandleDocumentMessage downloads documents
func (*Bwhatsapp) HandleError ¶
HandleError received from WhatsApp
func (*Bwhatsapp) HandleImageMessage ¶
func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage)
HandleImageMessage sent from WhatsApp, relay it to the brige nolint:funlen
func (*Bwhatsapp) HandleTextMessage ¶
func (b *Bwhatsapp) HandleTextMessage(message whatsapp.TextMessage)
HandleTextMessage sent from WhatsApp, relay it to the brige
func (*Bwhatsapp) HandleVideoMessage ¶
func (b *Bwhatsapp) HandleVideoMessage(message whatsapp.VideoMessage)
HandleVideoMessage downloads video messages
func (*Bwhatsapp) JoinChannel ¶
func (b *Bwhatsapp) JoinChannel(channel config.ChannelInfo) error
JoinChannel Join a WhatsApp group specified in gateway config as channel='number-id@g.us' or channel='Channel name' Required implementation of the Bridger interface https://github.com/ashley-mspgeek/matterbridge/blob/2cfd880cdb0df29771bf8f31df8d990ab897889d/bridge/bridge.go#L11-L16
func (*Bwhatsapp) Login ¶
Login to WhatsApp creating a new session. This will require to scan a QR code on your mobile device
func (*Bwhatsapp) PostDocumentMessage ¶
Post a document message from the bridge to WhatsApp
func (*Bwhatsapp) PostImageMessage ¶
Post an image message from the bridge to WhatsApp Handle, for sure image/jpeg, image/png and image/gif MIME types