whatsapp

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 1 Imported by: 0

README

WhatsApp

IMPORTANT

Broken state; see #274

Since our previous WhatsApp client library was abandoned, we had to switch to a new one. Unfortunately, the new library is not yet ready for production use. We are working on a solution, but it will take some time.

The broken client library caused our CI pipeline to break and for that reason we decided to turn the WhatsApp service into a no-op service. This means that the WhatsApp service will not send any notifications, but it will not return any errors either. This is a temporary solution until we have a working client library. We chose no-op over a hard error to prevent breaking existing applications.

Documentation

Overview

Package whatsapp is currently a [ NO-OP ] service! We're sorry for the inconveniences. We're already working on a fix.

Please read this [1] for more. Thanks!

[1]:https://github.com/nikoksr/notify/issues/274

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{}

Service encapsulates the WhatsApp client along with internal state for storing contacts.

func New

func New() (*Service, error)

New returns a new instance of a WhatsApp notification service.

func (*Service) AddReceivers

func (s *Service) AddReceivers(_ ...string)

AddReceivers takes WhatsApp contacts and adds them to the internal contacts list. The Send method will send a given message to all those contacts.

func (*Service) LoginWithQRCode

func (s *Service) LoginWithQRCode() error

LoginWithQRCode provides helper for authentication using QR code on terminal. Refer: https://github.com/Rhymen/go-whatsapp#login for more information.

func (*Service) LoginWithSessionCredentials

func (s *Service) LoginWithSessionCredentials(_, _, _, _ string, _, _ []byte) error

LoginWithSessionCredentials provides helper for authentication using whatsapp.Session credentials.

func (*Service) Send

func (s *Service) Send(_ context.Context, _, _ string) error

Send takes a message subject and a message body and sends them to all previously set contacts.

Jump to

Keyboard shortcuts

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