Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // fake team to handle direct messages. Direct Messages does not belong // to a particular Team, so to manage them uniformely we use this special team DirectMessagesFakeTeam = &Team{Name: "Direct Messages", ID: ""} )
Functions ¶
func MessageContainsMentions ¶
Types ¶
type Channel ¶
func (*Channel) GetChannelName ¶
type ChannelMembership ¶
type ChannelMembership struct { Channel *Channel User *User LastReadPost time.Time NotifyProps map[string]string }
func (*ChannelMembership) IsMuted ¶
func (cm *ChannelMembership) IsMuted() bool
type ChannelMissedActivity ¶
type ChannelMissedActivity struct { Channel *Channel User *User UnreadConversations []*UnreadConversation Logs []string RepliesInNotFollowingConvs int NotifiedByMMMessages int PreviouslyNotified int }
func NewChannelMissedActivity ¶
func NewChannelMissedActivity(channel *Channel, user *User) *ChannelMissedActivity
func (*ChannelMissedActivity) AppendLog ¶
func (cma *ChannelMissedActivity) AppendLog(message string, a ...any)
func (*ChannelMissedActivity) GetChannelName ¶
func (cma *ChannelMissedActivity) GetChannelName() string
type MANUserPreferences ¶
type Post ¶
type Post struct { ID string Message string AuthorID string CreatedAt time.Time RootID string Type string FromBot bool IsSystemMessage bool }
posts coming from the db
type TeamMissedActivity ¶
type TeamMissedActivity struct { User *User Team *Team UnreadChannels []ChannelMissedActivity Logs []string }
func (*TeamMissedActivity) AppendLog ¶
func (uma *TeamMissedActivity) AppendLog(message string, a ...any)
type UnreadConversation ¶
type UnreadConversation struct { Following bool IsRootMessageUnread bool RootPost *Post Replies []*Post MostRecentMessage time.Time }
func NewUnreadConversation ¶
func NewUnreadConversation(rootPost *Post, following bool, rootPostUnread bool) *UnreadConversation
func (*UnreadConversation) AppendReply ¶
func (uc *UnreadConversation) AppendReply(post *Post)
func (*UnreadConversation) IsAuthor ¶
func (uc *UnreadConversation) IsAuthor(user *User) bool
type User ¶
type User struct { ID string Username string FirstName string LastName string Email string EmailVerified bool Active bool Roles []string Status string IsBot bool EmailsEnabled bool Image []byte MANPreferences MANUserPreferences AltText string // alternative text to show if the user photo cannot be visualized (e.g. in GMail client) }
func (*User) DisplayName ¶
Click to show internal directories.
Click to hide internal directories.