bmatrix

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 14 Imported by: 3

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 added in v1.20.0

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

type InReplyToRelation added in v1.24.0

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

type InReplyToRelationContent added in v1.24.0

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

type MessageRelation added in v1.20.0

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 added in v1.20.0

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

type ReplyMessage added in v1.24.0

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

type SubTextMessage added in v1.20.0

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