bmatrix

package
v0.0.0-...-9e1488a Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *bridge.Config) bridge.Bridger

Types

type Bmatrix

type Bmatrix struct {
	UserID      string
	NicknameMap map[string]NicknameCacheEntry
	RoomMap     map[string]string

	sync.RWMutex
	*bridge.Config
	// contains filtered or unexported fields
}

func (*Bmatrix) Connect

func (b *Bmatrix) Connect() error

func (*Bmatrix) Disconnect

func (b *Bmatrix) Disconnect() error

func (*Bmatrix) JoinChannel

func (b *Bmatrix) JoinChannel(channel config.ChannelInfo) error

func (*Bmatrix) Send

func (b *Bmatrix) Send(msg config.Message) (string, error)

type EditedMessage

type EditedMessage struct {
	NewContent SubTextMessage  `json:"m.new_content"`
	RelatedTo  MessageRelation `json:"m.relates_to"`
	matrix.TextMessage
}

type InReplyToRelation

type InReplyToRelation struct {
	InReplyTo InReplyToRelationContent `json:"m.in_reply_to"`
}

type InReplyToRelationContent

type InReplyToRelationContent struct {
	EventID string `json:"event_id"`
}

type MessageRelation

type MessageRelation struct {
	EventID string `json:"event_id"`
	Type    string `json:"rel_type"`
}

MessageRelation explains how the current message relates to a previous message. Notably used for message edits.

type NicknameCacheEntry

type NicknameCacheEntry struct {
	// contains filtered or unexported fields
}

type ReplyMessage

type ReplyMessage struct {
	RelatedTo InReplyToRelation `json:"m.relates_to"`
	matrix.TextMessage
}

type SubTextMessage

type SubTextMessage struct {
	MsgType       string `json:"msgtype"`
	Body          string `json:"body"`
	FormattedBody string `json:"formatted_body,omitempty"`
	Format        string `json:"format,omitempty"`
}

SubTextMessage represents the new content of the message in edit messages.

Jump to

Keyboard shortcuts

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