mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
Re-add function for service messages
This commit is contained in:
parent
66233721a2
commit
ebe3fcc33c
1 changed files with 12 additions and 0 deletions
|
@ -41,6 +41,18 @@ func NewExpandedTextMessage(evt *muksevt.Event, displayname string, text tstring
|
|||
})
|
||||
}
|
||||
|
||||
func NewServiceMessage(text string) *UIMessage {
|
||||
return &UIMessage{
|
||||
SenderID: "*",
|
||||
SenderName: "*",
|
||||
Timestamp: time.Now(),
|
||||
IsService: true,
|
||||
Renderer: &ExpandedTextMessage{
|
||||
Text: tstring.NewTString(text),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func NewDateChangeMessage(text string) *UIMessage {
|
||||
midnight := time.Now()
|
||||
midnight = time.Date(midnight.Year(), midnight.Month(), midnight.Day(),
|
||||
|
|
Loading…
Add table
Reference in a new issue