bmatrix

package
Version: v1.22.3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 14 Imported by: 2

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

type SubTextMessage struct {
	MsgType string `json:"msgtype"`
	Body    string `json:"body"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL