summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model/thread.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-10-16 23:11:32 +0200
committerWim <wim@42.be>2021-10-16 23:23:24 +0200
commit20f6c05ec50739d31f4dbe9fde0d223f2c43f6e8 (patch)
tree230edca06449a8d1755f08aabf45a03e07e6f17c /vendor/github.com/mattermost/mattermost-server/v6/model/thread.go
parent57fce93af7f64f025cec6f3ed6088163086bc9fe (diff)
downloadmatterbridge-msglm-20f6c05ec50739d31f4dbe9fde0d223f2c43f6e8.tar.gz
matterbridge-msglm-20f6c05ec50739d31f4dbe9fde0d223f2c43f6e8.tar.bz2
matterbridge-msglm-20f6c05ec50739d31f4dbe9fde0d223f2c43f6e8.zip
Update vendor
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/thread.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/thread.go72
1 files changed, 72 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/thread.go b/vendor/github.com/mattermost/mattermost-server/v6/model/thread.go
new file mode 100644
index 00000000..e774e87a
--- /dev/null
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/thread.go
@@ -0,0 +1,72 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See LICENSE.txt for license information.
+
+package model
+
+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"`
+}
+
+type ThreadResponse struct {
+ PostId string `json:"id"`
+ ReplyCount int64 `json:"reply_count"`
+ LastReplyAt int64 `json:"last_reply_at"`
+ LastViewedAt int64 `json:"last_viewed_at"`
+ Participants []*User `json:"participants"`
+ Post *Post `json:"post"`
+ UnreadReplies int64 `json:"unread_replies"`
+ UnreadMentions int64 `json:"unread_mentions"`
+}
+
+type Threads struct {
+ Total int64 `json:"total"`
+ TotalUnreadThreads int64 `json:"total_unread_threads"`
+ TotalUnreadMentions int64 `json:"total_unread_mentions"`
+ Threads []*ThreadResponse `json:"threads"`
+}
+
+type GetUserThreadsOpts struct {
+ // PageSize specifies the size of the returned chunk of results. Default = 30
+ PageSize uint64
+
+ // Extended will enrich the response with participant details. Default = false
+ Extended bool
+
+ // Deleted will specify that even deleted threads should be returned (For mobile sync). Default = false
+ Deleted bool
+
+ // Since filters the threads based on their LastUpdateAt timestamp.
+ Since uint64
+
+ // Before specifies thread id as a cursor for pagination and will return `PageSize` threads before the cursor
+ Before string
+
+ // After specifies thread id as a cursor for pagination and will return `PageSize` threads after the cursor
+ After string
+
+ // Unread will make sure that only threads with unread replies are returned
+ Unread bool
+
+ // TotalsOnly will not fetch any threads and just fetch the total counts
+ TotalsOnly bool
+
+ // TeamOnly will only fetch threads and unreads for the specified team and excludes DMs/GMs
+ TeamOnly bool
+}
+
+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"`
+ UnreadMentions int64 `json:"unread_mentions"`
+}