diff options
author | Wim <wim@42.be> | 2022-04-01 00:23:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 00:23:19 +0200 |
commit | c6716e030c02f316b887c1d3ee4b443aa3ab6afd (patch) | |
tree | 470461fe2d29662e7a69834ed21fce30beed65ab /vendor/github.com/mattermost/mattermost-server/v6/model/status.go | |
parent | 4ab72acec656dafd304f88359b509b1f27c06604 (diff) | |
download | matterbridge-msglm-c6716e030c02f316b887c1d3ee4b443aa3ab6afd.tar.gz matterbridge-msglm-c6716e030c02f316b887c1d3ee4b443aa3ab6afd.tar.bz2 matterbridge-msglm-c6716e030c02f316b887c1d3ee4b443aa3ab6afd.zip |
Update dependencies (#1784)
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/status.go')
-rw-r--r-- | vendor/github.com/mattermost/mattermost-server/v6/model/status.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/status.go b/vendor/github.com/mattermost/mattermost-server/v6/model/status.go index 45a6d5d2..5a5e9425 100644 --- a/vendor/github.com/mattermost/mattermost-server/v6/model/status.go +++ b/vendor/github.com/mattermost/mattermost-server/v6/model/status.go @@ -34,6 +34,19 @@ func (s *Status) ToJSON() ([]byte, error) { return json.Marshal(sCopy) } +// The following are some GraphQL methods necessary to return the +// data in float64 type. The spec doesn't support 64 bit integers, +// so we have to pass the data in float64. The _ at the end is +// a hack to keep the attribute name same in GraphQL schema. + +func (s *Status) LastActivityAt_() float64 { + return float64(s.LastActivityAt) +} + +func (s *Status) DNDEndTime_() float64 { + return float64(s.DNDEndTime) +} + func StatusListToJSON(u []*Status) ([]byte, error) { list := make([]Status, len(u)) for i, s := range u { |