diff options
author | Corey Hulen <corey@hulen.com> | 2017-08-22 10:20:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 10:20:54 -0700 |
commit | b0e367b19249e72748e719b7ff69671db3656e25 (patch) | |
tree | a0a53d33033f2830b7b53abbdb89ed8f2a8f6203 /model/channel.go | |
parent | 1ce079d2d04442fb91485e88cbda67ebf260a9e8 (diff) | |
download | chat-b0e367b19249e72748e719b7ff69671db3656e25.tar.gz chat-b0e367b19249e72748e719b7ff69671db3656e25.tar.bz2 chat-b0e367b19249e72748e719b7ff69671db3656e25.zip |
Fixing race in update channel (#7269)
* Fixing race in update channel
* Switching to struct copy
Diffstat (limited to 'model/channel.go')
-rw-r--r-- | model/channel.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/model/channel.go b/model/channel.go index 50d487557..48abd1070 100644 --- a/model/channel.go +++ b/model/channel.go @@ -53,6 +53,11 @@ type ChannelPatch struct { Purpose *string `json:"purpose"` } +func (o *Channel) DeepCopy() *Channel { + copy := *o + return © +} + func (o *Channel) ToJson() string { b, err := json.Marshal(o) if err != nil { |