Documentation
¶
Index ¶
- Variables
- func DownloadMessageMedia(ctx context.Context, bot *libwechat.Bot, msg *wxtypes.WeixinMessage) []types.MediaFile
- type WeChat
- func (w *WeChat) Creds() *types.Credentials
- func (w *WeChat) Name() string
- func (w *WeChat) Presenter() channel.Presenter
- func (w *WeChat) ProbeThread(_ context.Context, _ string) error
- func (w *WeChat) RenameThread(_ context.Context, _, _ string)
- func (w *WeChat) Send(ctx context.Context, msg channel.OutboundMessage) error
- func (w *WeChat) Setup(ctx context.Context) error
- func (w *WeChat) ShareQR(ctx context.Context) (string, error)
- func (w *WeChat) Start(ctx context.Context, handler channel.InboundHandler) error
- func (w *WeChat) StartTyping(ctx context.Context, userID, replyToken string) (stop func())
Constants ¶
This section is empty.
Variables ¶
View Source
var PromptMD string
Functions ¶
func DownloadMessageMedia ¶
func DownloadMessageMedia(ctx context.Context, bot *libwechat.Bot, msg *wxtypes.WeixinMessage) []types.MediaFile
DownloadMessageMedia downloads all media from a WeChat message to /tmp. Errors on individual items are logged and skipped.
Types ¶
type WeChat ¶
type WeChat struct {
// contains filtered or unexported fields
}
WeChat implements channel.Channel for the WeChat iLink platform.
func New ¶
func New(creds *types.Credentials, accountsDir string) *WeChat
New creates a WeChat backend with the given credentials.
func (*WeChat) Creds ¶
func (w *WeChat) Creds() *types.Credentials
Creds returns the stored credentials (for persistence by caller).
func (*WeChat) ShareQR ¶
ShareQR fetches a bot login QR code, saves it as a PNG image, and polls for scan confirmation in the background. On success, saves credentials to the accounts directory (picked up by the file watcher).
Click to show internal directories.
Click to hide internal directories.