IsServerBannedFromRoom returns whether the server is banned from a room by server ACLs.
(ctx context.Context, rsAPI FederationRoomserverAPI, roomID string, serverName gomatrixserverlib.ServerName)
| 130 | |
| 131 | // IsServerBannedFromRoom returns whether the server is banned from a room by server ACLs. |
| 132 | func IsServerBannedFromRoom(ctx context.Context, rsAPI FederationRoomserverAPI, roomID string, serverName gomatrixserverlib.ServerName) bool { |
| 133 | req := &QueryServerBannedFromRoomRequest{ |
| 134 | ServerName: serverName, |
| 135 | RoomID: roomID, |
| 136 | } |
| 137 | res := &QueryServerBannedFromRoomResponse{} |
| 138 | if err := rsAPI.QueryServerBannedFromRoom(ctx, req, res); err != nil { |
| 139 | util.GetLogger(ctx).WithError(err).Error("Failed to QueryServerBannedFromRoom") |
| 140 | return true |
| 141 | } |
| 142 | return res.Banned |
| 143 | } |
| 144 | |
| 145 | // PopulatePublicRooms extracts PublicRoom information for all the provided room IDs. The IDs are not checked to see if they are visible in the |
| 146 | // published room directory. |
nothing calls this directly
no test coverage detected