mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Fix S1036: unnecessary guard around map access
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
This commit is contained in:
parent
23605d9760
commit
20e5e0274a
|
|
@ -717,11 +717,7 @@ func ResolveConflictsAdhoc(
|
||||||
// Append the events if there is already a conflicted list for
|
// Append the events if there is already a conflicted list for
|
||||||
// this tuple key, create it if not.
|
// this tuple key, create it if not.
|
||||||
tuple := stateKeyTuple{event.Type(), *event.StateKey()}
|
tuple := stateKeyTuple{event.Type(), *event.StateKey()}
|
||||||
if _, ok := eventMap[tuple]; ok {
|
eventMap[tuple] = append(eventMap[tuple], event)
|
||||||
eventMap[tuple] = append(eventMap[tuple], event)
|
|
||||||
} else {
|
|
||||||
eventMap[tuple] = []gomatrixserverlib.Event{event}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split out the events in the map into conflicted and unconflicted
|
// Split out the events in the map into conflicted and unconflicted
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue