More detailed notification

This commit is contained in:
2024-07-20 16:02:16 +08:00
parent 09e670b096
commit fda9b7517c
7 changed files with 72 additions and 48 deletions

View File

@ -1,5 +1,7 @@
package models
import "fmt"
type ChannelType = uint8
const (
@ -25,6 +27,13 @@ type Channel struct {
RealmID *uint `json:"realm_id"`
}
func (v Channel) DisplayText() string {
if v.Type == ChannelTypeDirect {
return "DM"
}
return fmt.Sprintf("#%s", v.Alias)
}
type NotifyLevel = int8
const (