summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v5/model/thread.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-11-22 15:55:57 +0100
committerGitHub <noreply@github.com>2020-11-22 15:55:57 +0100
commit4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf (patch)
tree92d3b8d27cd35455eae7423e4d47aad67cc6a43b /vendor/github.com/mattermost/mattermost-server/v5/model/thread.go
parentcbb46293ab670c1989bfcd9aae5d853223074038 (diff)
downloadmatterbridge-msglm-4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf.tar.gz
matterbridge-msglm-4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf.tar.bz2
matterbridge-msglm-4cc2c914e634eb8c79eb61aa1bc29faf6021ffcf.zip
Update vendor (#1297)
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v5/model/thread.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v5/model/thread.go38
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v5/model/thread.go b/vendor/github.com/mattermost/mattermost-server/v5/model/thread.go
new file mode 100644
index 00000000..969a599e
--- /dev/null
+++ b/vendor/github.com/mattermost/mattermost-server/v5/model/thread.go
@@ -0,0 +1,38 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See LICENSE.txt for license information.
+
+package model
+
+import (
+ "encoding/json"
+)
+
+type Thread struct {
+ PostId string `json:"id"`
+ ChannelId string `json:"channel_id"`
+ ReplyCount int64 `json:"reply_count"`
+ LastReplyAt int64 `json:"last_reply_at"`
+ Participants StringArray `json:"participants"`
+}
+
+func (o *Thread) ToJson() string {
+ b, _ := json.Marshal(o)
+ return string(b)
+}
+
+func (o *Thread) Etag() string {
+ return Etag(o.PostId, o.LastReplyAt)
+}
+
+type ThreadMembership struct {
+ PostId string `json:"post_id"`
+ UserId string `json:"user_id"`
+ Following bool `json:"following"`
+ LastViewed int64 `json:"last_view_at"`
+ LastUpdated int64 `json:"last_update_at"`
+}
+
+func (o *ThreadMembership) ToJson() string {
+ b, _ := json.Marshal(o)
+ return string(b)
+}