diff options
author | Mark Haines <mjark@negativecurvature.net> | 2017-03-17 13:10:25 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2017-03-17 13:10:25 +0000 |
commit | 812fdbe22a46340de7c53b0dfdb7535f42b40a5f (patch) | |
tree | 50d39ed899eec8c4236b242ccda2a4da62b48daa /vendor | |
parent | ac66d071779b77613092a89f421073854b666647 (diff) |
gb vendor update github.com/matrix-org/gomatrixserverlib
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/manifest | 4 | ||||
-rw-r--r-- | vendor/src/github.com/matrix-org/gomatrixserverlib/stateresolution.go | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/vendor/manifest b/vendor/manifest index f252c6a3..61f8d20a 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -92,7 +92,7 @@ { "importpath": "github.com/matrix-org/gomatrixserverlib", "repository": "https://github.com/matrix-org/gomatrixserverlib", - "revision": "131b3e83fe053bc40f6909226b8c3c1d186799c1", + "revision": "775bc0b4341689c9fbb573008c3095495738f092", "branch": "master" }, { @@ -206,4 +206,4 @@ "branch": "master" } ] -} +}
\ No newline at end of file diff --git a/vendor/src/github.com/matrix-org/gomatrixserverlib/stateresolution.go b/vendor/src/github.com/matrix-org/gomatrixserverlib/stateresolution.go index cac03cf3..3091acd7 100644 --- a/vendor/src/github.com/matrix-org/gomatrixserverlib/stateresolution.go +++ b/vendor/src/github.com/matrix-org/gomatrixserverlib/stateresolution.go @@ -11,6 +11,8 @@ import ( // and works out which event should be used for each state event. func ResolveStateConflicts(conflicted []Event, authEvents []Event) []Event { var r stateResolver + r.resolvedThirdPartyInvites = map[string]*Event{} + r.resolvedMembers = map[string]*Event{} // Group the conflicted events by type and state key. r.addConflicted(conflicted) // Add the unconflicted auth events needed for auth checks. @@ -124,6 +126,7 @@ func (r *stateResolver) addConflicted(events []Event) { // new block to the block list. offset = len(*blockList) *blockList = append(*blockList, nil) + offsets[key] = offset } // Get the address of the block in the block list. block := &(*blockList)[offset] @@ -187,6 +190,9 @@ func (r *stateResolver) removeAuthEvent(eventType, stateKey string) { func (r *stateResolver) resolveAndAddAuthBlocks(blocks [][]Event) { start := len(r.result) for _, block := range blocks { + if len(block) == 0 { + continue + } if event := r.resolveAuthBlock(block); event != nil { r.result = append(r.result, *event) } |