diff options
author | Wim <wim@42.be> | 2020-03-01 20:59:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 20:59:19 +0100 |
commit | 250b3bb5795240d5ebdab5416ab99dbc41be734b (patch) | |
tree | 11e44ec2e7e37cd7eb0deaf0a7843fe6bf3c0e40 /vendor/github.com/slack-go/slack/history.go | |
parent | e9edbfc051afc643d91fc04bc7fb3fe70039c213 (diff) | |
download | matterbridge-msglm-250b3bb5795240d5ebdab5416ab99dbc41be734b.tar.gz matterbridge-msglm-250b3bb5795240d5ebdab5416ab99dbc41be734b.tar.bz2 matterbridge-msglm-250b3bb5795240d5ebdab5416ab99dbc41be734b.zip |
Use upstream slack-go/slack again (#1018)
Diffstat (limited to 'vendor/github.com/slack-go/slack/history.go')
-rw-r--r-- | vendor/github.com/slack-go/slack/history.go | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/github.com/slack-go/slack/history.go b/vendor/github.com/slack-go/slack/history.go new file mode 100644 index 00000000..87b2e1ed --- /dev/null +++ b/vendor/github.com/slack-go/slack/history.go @@ -0,0 +1,36 @@ +package slack + +const ( + DEFAULT_HISTORY_LATEST = "" + DEFAULT_HISTORY_OLDEST = "0" + DEFAULT_HISTORY_COUNT = 100 + DEFAULT_HISTORY_INCLUSIVE = false + DEFAULT_HISTORY_UNREADS = false +) + +// HistoryParameters contains all the necessary information to help in the retrieval of history for Channels/Groups/DMs +type HistoryParameters struct { + Latest string + Oldest string + Count int + Inclusive bool + Unreads bool +} + +// History contains message history information needed to navigate a Channel / Group / DM history +type History struct { + Latest string `json:"latest"` + Messages []Message `json:"messages"` + HasMore bool `json:"has_more"` +} + +// NewHistoryParameters provides an instance of HistoryParameters with all the sane default values set +func NewHistoryParameters() HistoryParameters { + return HistoryParameters{ + Latest: DEFAULT_HISTORY_LATEST, + Oldest: DEFAULT_HISTORY_OLDEST, + Count: DEFAULT_HISTORY_COUNT, + Inclusive: DEFAULT_HISTORY_INCLUSIVE, + Unreads: DEFAULT_HISTORY_UNREADS, + } +} |