summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/helpers.go b/helpers.go
index 27f6a73..26806f5 100644
--- a/helpers.go
+++ b/helpers.go
@@ -96,8 +96,8 @@ func (x *Chats) AppendNew(y *Chat) {
// a Append() shortcut (that does Clone() with a mutex) notsure if it really works
func (x *Chat) AppendEntry(y *ChatEntry) {
- x.Lock()
- defer x.Unlock()
+ chatMu.Lock()
+ defer chatMu.Unlock()
x.Entries = append(x.Entries, proto.Clone(y).(*ChatEntry))
}