aboutsummaryrefslogtreecommitdiff
path: root/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'account.go')
-rw-r--r--account.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/account.go b/account.go
index 7071397..b0313a4 100644
--- a/account.go
+++ b/account.go
@@ -453,6 +453,9 @@ func (a *Account) eventInternal(event *Event) error {
var cache_key string
if event.Id != "" {
+ dbLockSlot(mx_room_id)
+ defer dbUnlockSlot(mx_room_id)
+
// If the event has an ID, make sure it is processed only once
cache_key = fmt.Sprintf("%s/event_seen/%s/%s",
a.Protocol, mx_room_id, event.Id)