summaryrefslogtreecommitdiffstats
path: root/bridge/config
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/config')
-rw-r--r--bridge/config/config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/bridge/config/config.go b/bridge/config/config.go
index 7dbbc80b..98935208 100644
--- a/bridge/config/config.go
+++ b/bridge/config/config.go
@@ -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