From f0fd9a9e8b85544089246bde71b6d61ba90eeb0e Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 26 Aug 2015 12:49:07 -0400 Subject: Adding ability to export data from mattermost --- model/channel.go | 3 +++ model/post.go | 3 +++ model/team.go | 3 +++ model/user.go | 10 ++++++++++ 4 files changed, 19 insertions(+) (limited to 'model') diff --git a/model/channel.go b/model/channel.go index b46f79f75..7d8edeee7 100644 --- a/model/channel.go +++ b/model/channel.go @@ -117,3 +117,6 @@ func (o *Channel) PreUpdate() { func (o *Channel) ExtraUpdated() { o.ExtraUpdateAt = GetMillis() } + +func (o *Channel) PreExport() { +} diff --git a/model/post.go b/model/post.go index 0c035d4e7..e78469940 100644 --- a/model/post.go +++ b/model/post.go @@ -147,3 +147,6 @@ func (o *Post) AddProp(key string, value string) { o.Props[key] = value } + +func (o *Post) PreExport() { +} diff --git a/model/team.go b/model/team.go index 95e2757c8..6006f738c 100644 --- a/model/team.go +++ b/model/team.go @@ -197,3 +197,6 @@ func CleanTeamName(s string) string { return s } + +func (o *Team) PreExport() { +} diff --git a/model/user.go b/model/user.go index d82f96db3..9f90b8204 100644 --- a/model/user.go +++ b/model/user.go @@ -272,6 +272,16 @@ func (u *User) GetDisplayName() string { } } +func (u *User) PreExport() { + u.Password = "" + u.AuthData = "" + u.LastActivityAt = 0 + u.LastPingAt = 0 + u.LastPasswordUpdate = 0 + u.LastPictureUpdate = 0 + u.FailedAttempts = 0 +} + // UserFromJson will decode the input and return a User func UserFromJson(data io.Reader) *User { decoder := json.NewDecoder(data) -- cgit v1.2.3-1-g7c22