Documentation ¶
Index ¶
Constants ¶
View Source
const TypingTimeout = 5_000
TypingTimeout in milliseconds, used to avoid stuck typing status
Variables ¶
This section is empty.
Functions ¶
func GetFileURL ¶
func GetFileURL(content *event.MessageEventContent) (fileName string, fileURL id.ContentURIString)
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot represents matrix bot
func NewBot ¶
func NewBot( lp *linkpearl.Linkpearl, log *zerolog.Logger, cfg *config.Manager, psdc *psd.Client, rdm *redmine.Redmine, prefix string, roomID string, cacheSize int, ) (*Bot, error)
NewBot creates a new matrix bot
func (*Bot) SendNotice ¶
func (b *Bot) SendNotice(ctx context.Context, roomID id.RoomID, message string, raw map[string]any, relates ...*event.RelatesTo) id.EventID
SendNotice is a copy of linkpearl.SendNotice, but with raw content support
func (*Bot) SyncIssues ¶
func (b *Bot) SyncIssues()
SyncIssues fetches redmine issue status and notes and sends them to the corresponding rooms due to the lack of a proper redmine webhook, this function is called periodically, due to the complexity of that function, it has own "syncing" flag that prevents multiple calls at once
type MSC4144Profile ¶
type MSC4144Profile struct { ID string `json:"id"` // The id field is required and is an opaque string. Clients may use it to group messages with the same ID like they would group messages from the same sender. For example, bridges would likely set it to the immutable remote user ID. DisplayName string `json:"displayname"` // The displayname field represents the human-readable display name of the user who sent the message. It is recommended that clients use this display name when showing messages to end users. AvatarURL id.ContentURI `json:"avatar_url"` // The avatar_url field represents the URL of the avatar image that should be used when rendering the message. This URL must be an MXC URI. }
MSC4144Profile represents the profile of the user according to MSC4144 ref: https://github.com/beeper/matrix-spec-proposals/blob/per-message-profile/proposals/4144-per-message-profile.md
Source Files ¶
Click to show internal directories.
Click to hide internal directories.