mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-09-16 07:12:31 +00:00
Update mattermost vendor (3.7 => 4.1)
This commit is contained in:
32
vendor/github.com/mattermost/platform/model/channel_member.go
generated
vendored
32
vendor/github.com/mattermost/platform/model/channel_member.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package model
|
||||
@@ -19,11 +19,11 @@ const (
|
||||
)
|
||||
|
||||
type ChannelUnread struct {
|
||||
TeamId string
|
||||
TotalMsgCount int64
|
||||
MsgCount int64
|
||||
MentionCount int64
|
||||
NotifyProps StringMap
|
||||
TeamId string `json:"team_id"`
|
||||
ChannelId string `json:"channel_id"`
|
||||
MsgCount int64 `json:"msg_count"`
|
||||
MentionCount int64 `json:"mention_count"`
|
||||
NotifyProps StringMap `json:"-"`
|
||||
}
|
||||
|
||||
type ChannelMember struct {
|
||||
@@ -47,6 +47,15 @@ func (o *ChannelMembers) ToJson() string {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *ChannelUnread) ToJson() string {
|
||||
b, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
return ""
|
||||
} else {
|
||||
return string(b)
|
||||
}
|
||||
}
|
||||
|
||||
func ChannelMembersFromJson(data io.Reader) *ChannelMembers {
|
||||
decoder := json.NewDecoder(data)
|
||||
var o ChannelMembers
|
||||
@@ -58,6 +67,17 @@ func ChannelMembersFromJson(data io.Reader) *ChannelMembers {
|
||||
}
|
||||
}
|
||||
|
||||
func ChannelUnreadFromJson(data io.Reader) *ChannelUnread {
|
||||
decoder := json.NewDecoder(data)
|
||||
var o ChannelUnread
|
||||
err := decoder.Decode(&o)
|
||||
if err == nil {
|
||||
return &o
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (o *ChannelMember) ToJson() string {
|
||||
b, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user