render

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntitiesToANSI

func EntitiesToANSI(text *telegram.FormattedText) string

EntitiesToANSI converts Telegram formatted text directly to ANSI escape codes.

func EntitiesToMarkdown

func EntitiesToMarkdown(text *telegram.FormattedText) string

EntitiesToMarkdown converts Telegram formatted text entities to markdown.

func FormatLastSeen

func FormatLastSeen(ts int32) string

FormatLastSeen formats a user's last seen timestamp.

func FormatRelativeTime

func FormatRelativeTime(ts int32) string

FormatRelativeTime returns a relative time string (e.g., "2m ago").

func FormatTimestamp

func FormatTimestamp(ts int32) string

FormatTimestamp formats a Unix timestamp for display.

Types

type MessageRenderer

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

func NewMessageRenderer

func NewMessageRenderer(th *theme.Theme) *MessageRenderer

func (*MessageRenderer) RenderMessage

func (r *MessageRenderer) RenderMessage(msg *telegram.Message, s *store.Store, isOwn, isSelected bool, maxWidth int) string

Jump to

Keyboard shortcuts

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