mcontent

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: AGPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	*gtk.Box
	// contains filtered or unexported fields
}

Content is a message content widget.

func New

New parses the given room message event and renders it into a Content widget.

func (*Content) EditedTimestamp

func (c *Content) EditedTimestamp() (matrix.Timestamp, bool)

EditedTimestamp returns either the Matrix timestamp if the message content has been edited or false if not.

func (*Content) LoadMore

func (c *Content) LoadMore()

func (*Content) OnRelatedEvent

func (c *Content) OnRelatedEvent(ev event.RoomEvent) bool

func (*Content) SetExtraMenu

func (c *Content) SetExtraMenu(menu gio.MenuModeller)

SetExtraMenu sets the extra menu for the message content.

type MessageBody

type MessageBody struct {
	Body          string              `json:"body"`
	MsgType       event.MessageType   `json:"msgtype"`
	Format        event.MessageFormat `json:"format,omitempty"`
	FormattedBody string              `json:"formatted_body,omitempty"`
}

func MsgBody

func MsgBody(ev *event.RoomMessageEvent) (m MessageBody, edited bool)

MsgBody parses the message event and accounts for edited ones.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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