mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
MSC2946: Use new MSC1772 format for space parents (#1713)
This commit is contained in:
parent
2626525c65
commit
5366c33885
3 changed files with 14 additions and 23 deletions
|
@ -22,7 +22,6 @@ import (
|
|||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
"github.com/matrix-org/dendrite/setup/config"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -175,7 +174,7 @@ func SpaceTarget(he *gomatrixserverlib.HeaderedEvent) string {
|
|||
}
|
||||
switch he.Type() {
|
||||
case ConstSpaceParentEventType:
|
||||
return gjson.GetBytes(he.Content(), "room_id").Str
|
||||
return *he.StateKey()
|
||||
case ConstSpaceChildEventType:
|
||||
return *he.StateKey()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue