matrix

package
v0.0.0-...-e244c7a Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTexts

func ExtractTexts(formattedBody string) (originalText, replyText string, err error)

ExtractTexts extracts the original and reply texts from a formatted body of an event.

Types

type Service

type Service interface {
	Register(username, password string) (err error)
	Login(username, password string) (err error)
	Auth()
	SendMessage(roomID id.RoomID, text string) (*mautrix.RespSendEvent, error)
	GetRepliedEvent(evt *event.Event) (*event.Event, error)
	IsPrivateRoom(roomID id.RoomID) (bool, error)
}

Service defines the methods for interacting with the Matrix Synapse server.

func New

func New(db db.Service, snetSyncer syncer.SnetSyncer, grpcManager *grpcmanager.GRPCClientManager, eth blockchain.Ethereum) Service

New creates a new instance of the service and initializes the Matrix client.

Jump to

Keyboard shortcuts

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