mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 17:13:11 +01:00
Add state key to m.bridge events
This commit is contained in:
parent
47a1d7f6cb
commit
b8de8544e1
1 changed files with 3 additions and 0 deletions
|
@ -855,6 +855,7 @@ func (portal *Portal) CreateMatrixRoom(user *User) error {
|
|||
},
|
||||
},
|
||||
}
|
||||
bridgeInfoStateKey := fmt.Sprintf("net.maunium.whatsapp://whatsapp/%s", portal.Key.JID)
|
||||
initialState := []*event.Event{{
|
||||
Type: event.StatePowerLevels,
|
||||
Content: event.Content{
|
||||
|
@ -863,10 +864,12 @@ func (portal *Portal) CreateMatrixRoom(user *User) error {
|
|||
}, {
|
||||
Type: StateBridgeInfo,
|
||||
Content: bridgeInfo,
|
||||
StateKey: &bridgeInfoStateKey,
|
||||
}, {
|
||||
// TODO remove this once https://github.com/matrix-org/matrix-doc/pull/2346 is in spec
|
||||
Type: StateHalfShotBridgeInfo,
|
||||
Content: bridgeInfo,
|
||||
StateKey: &bridgeInfoStateKey,
|
||||
}}
|
||||
if !portal.AvatarURL.IsEmpty() {
|
||||
initialState = append(initialState, &event.Event{
|
||||
|
|
Loading…
Reference in a new issue