mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 08:49:24 +00:00
Refactor "msg-parent-not-found" to config.ParentIDNotFound (#1347)
This commit is contained in:
@ -29,6 +29,8 @@ const (
|
||||
EventNoticeIRC = "notice_irc"
|
||||
)
|
||||
|
||||
const ParentIDNotFound = "msg-parent-not-found"
|
||||
|
||||
type Message struct {
|
||||
Text string `json:"text"`
|
||||
Channel string `json:"channel"`
|
||||
@ -45,6 +47,14 @@ type Message struct {
|
||||
Extra map[string][]interface{}
|
||||
}
|
||||
|
||||
func (m Message) ParentNotFound() bool {
|
||||
return m.ParentID == ParentIDNotFound
|
||||
}
|
||||
|
||||
func (m Message) ParentValid() bool {
|
||||
return m.ParentID != "" && !m.ParentNotFound()
|
||||
}
|
||||
|
||||
type FileInfo struct {
|
||||
Name string
|
||||
Data *[]byte
|
||||
|
Reference in New Issue
Block a user