mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Update Valid()
This commit is contained in:
parent
6192a64595
commit
01a78f316f
2
go.mod
2
go.mod
|
|
@ -22,7 +22,7 @@ require (
|
||||||
github.com/matrix-org/dugong v0.0.0-20210921133753-66e6b1c67e2e
|
github.com/matrix-org/dugong v0.0.0-20210921133753-66e6b1c67e2e
|
||||||
github.com/matrix-org/go-sqlite3-js v0.0.0-20220419092513-28aa791a1c91
|
github.com/matrix-org/go-sqlite3-js v0.0.0-20220419092513-28aa791a1c91
|
||||||
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16
|
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16
|
||||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012074709-35dad21e1a8b
|
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012083703-58d874bb946c
|
||||||
github.com/matrix-org/pinecone v0.0.0-20220929155234-2ce51dd4a42c
|
github.com/matrix-org/pinecone v0.0.0-20220929155234-2ce51dd4a42c
|
||||||
github.com/matrix-org/util v0.0.0-20200807132607-55161520e1d4
|
github.com/matrix-org/util v0.0.0-20200807132607-55161520e1d4
|
||||||
github.com/mattn/go-sqlite3 v1.14.15
|
github.com/mattn/go-sqlite3 v1.14.15
|
||||||
|
|
|
||||||
4
go.sum
4
go.sum
|
|
@ -386,6 +386,10 @@ github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16 h1:ZtO5uywdd5d
|
||||||
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s=
|
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s=
|
||||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012074709-35dad21e1a8b h1:DELQ13s27W+wV6jX28O7+u+xSgacgcl0Ky1fjF/wnV4=
|
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012074709-35dad21e1a8b h1:DELQ13s27W+wV6jX28O7+u+xSgacgcl0Ky1fjF/wnV4=
|
||||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012074709-35dad21e1a8b/go.mod h1:Mtifyr8q8htcBeugvlDnkBcNUy5LO8OzUoplAf1+mb4=
|
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012074709-35dad21e1a8b/go.mod h1:Mtifyr8q8htcBeugvlDnkBcNUy5LO8OzUoplAf1+mb4=
|
||||||
|
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012083245-51ffebc3e633 h1:pR2wrPRjMR9VqlxSxtAfeo1TMQQMjYCx5m+kmEMV5Mc=
|
||||||
|
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012083245-51ffebc3e633/go.mod h1:Mtifyr8q8htcBeugvlDnkBcNUy5LO8OzUoplAf1+mb4=
|
||||||
|
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012083703-58d874bb946c h1:tKB19KYKI7nDQXEdXH3IdZ5pkpQM8aKJuwFulVpTirg=
|
||||||
|
github.com/matrix-org/gomatrixserverlib v0.0.0-20221012083703-58d874bb946c/go.mod h1:Mtifyr8q8htcBeugvlDnkBcNUy5LO8OzUoplAf1+mb4=
|
||||||
github.com/matrix-org/pinecone v0.0.0-20220929155234-2ce51dd4a42c h1:iCHLYwwlPsf4TYFrvhKdhQoAM2lXzcmDZYqwBNWcnVk=
|
github.com/matrix-org/pinecone v0.0.0-20220929155234-2ce51dd4a42c h1:iCHLYwwlPsf4TYFrvhKdhQoAM2lXzcmDZYqwBNWcnVk=
|
||||||
github.com/matrix-org/pinecone v0.0.0-20220929155234-2ce51dd4a42c/go.mod h1:K0N1ixHQxXoCyqolDqVxPM3ArrDtcMs8yegOx2Lfv9k=
|
github.com/matrix-org/pinecone v0.0.0-20220929155234-2ce51dd4a42c/go.mod h1:K0N1ixHQxXoCyqolDqVxPM3ArrDtcMs8yegOx2Lfv9k=
|
||||||
github.com/matrix-org/util v0.0.0-20200807132607-55161520e1d4 h1:eCEHXWDv9Rm335MSuB49mFUK44bwZPFSDde3ORE3syk=
|
github.com/matrix-org/util v0.0.0-20200807132607-55161520e1d4 h1:eCEHXWDv9Rm335MSuB49mFUK44bwZPFSDde3ORE3syk=
|
||||||
|
|
|
||||||
|
|
@ -133,12 +133,8 @@ type authEvents struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid verifies that all auth events are from the same room.
|
// Valid verifies that all auth events are from the same room.
|
||||||
func (ae *authEvents) Valid() bool {
|
func (ae *authEvents) Valid(roomID string) bool {
|
||||||
roomID := ""
|
|
||||||
for i := range ae.events {
|
for i := range ae.events {
|
||||||
if i == 0 {
|
|
||||||
roomID = ae.events[i].RoomID()
|
|
||||||
}
|
|
||||||
if roomID != ae.events[i].RoomID() {
|
if roomID != ae.events[i].RoomID() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue