simplex

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 34 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InteractiveSetup

func InteractiveSetup(ctx context.Context) error

SimpleX Chat wizard of icebath gateway setup writing the daemon settings to the home .env

Types

type SimplexAdapter

type SimplexAdapter struct {
	*gateway.BasePlatformAdapter
	// contains filtered or unexported fields
}

SimpleX Chat adapter over the simplex-chat daemon WebSocket API

func NewSimplexAdapter

func NewSimplexAdapter(ctx context.Context, config *gateway.PlatformConfig) (*SimplexAdapter, error)

Adapter for a platform config reading the daemon URL from extra and the accept and group policy from env then extra

func (*SimplexAdapter) AddReaction

func (a *SimplexAdapter) AddReaction(ctx context.Context, chatID, messageID, emoji string) error

Adds an emoji reaction to a chat item, SimpleX answering chatCmdError for a reaction it does not allow

func (*SimplexAdapter) Connect

func (a *SimplexAdapter) Connect(ctx context.Context, isReconnect bool) (bool, error)

Probes the daemon, then starts the listener and the idle monitor and marks the adapter connected

func (*SimplexAdapter) Disconnect

func (a *SimplexAdapter) Disconnect(ctx context.Context) error

Stops both tasks, closes the socket, cancels pending batches and replies and marks the adapter disconnected

func (*SimplexAdapter) GetChatInfo

func (a *SimplexAdapter) GetChatInfo(ctx context.Context, chatID string) (map[string]any, error)

Chat info of a group or direct chat id

func (*SimplexAdapter) ListChannels

func (a *SimplexAdapter) ListChannels(ctx context.Context) (any, error)

Contacts and groups of the daemon for the channel directory, nil while the socket is down or the daemon is silent

func (*SimplexAdapter) Send

func (a *SimplexAdapter) Send(ctx context.Context, chatID, content, replyTo string, metadata map[string]any) (gateway.SendResult, error)

Sends the text without waiting for a reply, then every MEDIA tag path as a voice note or a document

func (*SimplexAdapter) SendDocument

func (a *SimplexAdapter) SendDocument(ctx context.Context, chatID, filePath, caption, fileName, replyTo string, metadata, extra map[string]any) (gateway.SendResult, error)

Sends a local file as a file message

func (*SimplexAdapter) SendImage

func (a *SimplexAdapter) SendImage(ctx context.Context, chatID, imageURL, caption, replyTo string, metadata map[string]any) (gateway.SendResult, error)

Sends an image from a file URL or a downloaded web URL with an inline thumbnail

func (*SimplexAdapter) SendImageFile

func (a *SimplexAdapter) SendImageFile(ctx context.Context, chatID, imagePath, caption, replyTo string, metadata, extra map[string]any) (gateway.SendResult, error)

Sends a local image through the file URL path of the image send

func (*SimplexAdapter) SendTyping

func (a *SimplexAdapter) SendTyping(ctx context.Context, chatID string, metadata map[string]any) error

SimpleX has no typing indicator

func (*SimplexAdapter) SendVideo

func (a *SimplexAdapter) SendVideo(ctx context.Context, chatID, videoPath, caption, replyTo string, metadata, extra map[string]any) (gateway.SendResult, error)

Sends a video as a file attachment

func (*SimplexAdapter) SendVoice

func (a *SimplexAdapter) SendVoice(ctx context.Context, chatID, audioPath, caption, replyTo string, metadata, extra map[string]any) (gateway.SendResult, error)

Sends an audio file as an inline voice note carrying the duration the caller passed

func (*SimplexAdapter) TextBatchKey

func (a *SimplexAdapter) TextBatchKey(ctx context.Context, event *gateway.MessageEvent) (string, error)

Batch key of a text event, the platform value and the chat id

Jump to

Keyboard shortcuts

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