|
@@ -1141,7 +1141,7 @@ func (portal *Portal) CreateMatrixRoom(user *User, groupInfo *types.GroupInfo, i
|
|
portal.ensureUserInvited(user)
|
|
portal.ensureUserInvited(user)
|
|
user.syncChatDoublePuppetDetails(portal, true)
|
|
user.syncChatDoublePuppetDetails(portal, true)
|
|
|
|
|
|
- portal.addToSpace(user.getSpaceRoom(), portal.MXID)
|
|
|
|
|
|
+ portal.addToSpace(user.getSpaceRoom(), portal.MXID, portal.bridge.Config.Homeserver.Domain)
|
|
|
|
|
|
if groupInfo != nil {
|
|
if groupInfo != nil {
|
|
portal.SyncParticipants(user, groupInfo)
|
|
portal.SyncParticipants(user, groupInfo)
|
|
@@ -1178,12 +1178,13 @@ func (portal *Portal) CreateMatrixRoom(user *User, groupInfo *types.GroupInfo, i
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
|
|
|
|
-func (portal *Portal) addToSpace(spaceID id.RoomID, portalID id.RoomID) {
|
|
|
|
|
|
+func (portal *Portal) addToSpace(spaceID id.RoomID, portalID id.RoomID, homeserverDomain string) {
|
|
|
|
|
|
parentSpaceContent := make(map[string]interface{})
|
|
parentSpaceContent := make(map[string]interface{})
|
|
- parentSpaceContent["via"] = []string{"matrix.wounn.xyz"}
|
|
|
|
|
|
+ parentSpaceContent["via"] = []string{homeserverDomain}
|
|
|
|
+
|
|
|
|
+ portal.log.Debugfln("adding room %s to the space %s", portalID, spaceID)
|
|
|
|
|
|
- portal.log.Errorln("adding room " + portalID + " to the space " + spaceID)
|
|
|
|
portal.MainIntent().SendStateEvent(spaceID, event.Type{Type: "m.space.child", Class: event.StateEventType}, portalID.String(), parentSpaceContent)
|
|
portal.MainIntent().SendStateEvent(spaceID, event.Type{Type: "m.space.child", Class: event.StateEventType}, portalID.String(), parentSpaceContent)
|
|
}
|
|
}
|
|
|
|
|