summaryrefslogtreecommitdiffstats
path: root/model/post_list.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-13 10:52:50 -0500
committerCorey Hulen <corey@hulen.com>2017-02-13 10:52:50 -0500
commite4effd0c15a188eeec7a11f281e529afd6a54f80 (patch)
tree2c9b0f451366c54e163ac6f4743adf9e1cbd9a26 /model/post_list.go
parent260f1111e8988b177550d2621fbf99df178ca57a (diff)
downloadchat-e4effd0c15a188eeec7a11f281e529afd6a54f80.tar.gz
chat-e4effd0c15a188eeec7a11f281e529afd6a54f80.tar.bz2
chat-e4effd0c15a188eeec7a11f281e529afd6a54f80.zip
Implement some post endpoints for APIv4 (#5353)
* Implement POST /posts endpoint for APIv4 * Implement GET /channels/{channel_id}/posts endpoint for APIv4 * Implement GET /posts/{post_id} endpoint for APIv4 * Implement GET /posts/{post_id}/thread endpoint for APIv4 * Skip team get if it's a DM channel in handlePostEvents
Diffstat (limited to 'model/post_list.go')
-rw-r--r--model/post_list.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/model/post_list.go b/model/post_list.go
index 4c0f5408e..5a479ca35 100644
--- a/model/post_list.go
+++ b/model/post_list.go
@@ -75,7 +75,12 @@ func (o *PostList) Etag() string {
}
}
- return Etag(id, t)
+ orderId := ""
+ if len(o.Order) > 0 {
+ orderId = o.Order[0]
+ }
+
+ return Etag(orderId, id, t)
}
func (o *PostList) IsChannelId(channelId string) bool {