mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-10-10 11:32:46 +00:00
p2p: Implement published rooms (#923)
* Create and glue ExternalPublicRoomsProvider into the public rooms component This is how we will link p2p stuff to dendrite proper. * Use gmsl structs rather than our own * Implement federated public rooms - Make thirdparty endpoint r0 so riot-web loads the public room list * Typo * Missing callsites
This commit is contained in:
parent
dc06c69887
commit
bfbf96eec9
16 changed files with 263 additions and 81 deletions
|
@ -14,15 +14,11 @@
|
|||
|
||||
package types
|
||||
|
||||
// PublicRoom represents a local public room
|
||||
type PublicRoom struct {
|
||||
RoomID string `json:"room_id"`
|
||||
Aliases []string `json:"aliases,omitempty"`
|
||||
CanonicalAlias string `json:"canonical_alias,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Topic string `json:"topic,omitempty"`
|
||||
AvatarURL string `json:"avatar_url,omitempty"`
|
||||
NumJoinedMembers int64 `json:"num_joined_members"`
|
||||
WorldReadable bool `json:"world_readable"`
|
||||
GuestCanJoin bool `json:"guest_can_join"`
|
||||
// ExternalPublicRoomsProvider provides a list of homeservers who should be queried
|
||||
// periodically for a list of public rooms on their server.
|
||||
type ExternalPublicRoomsProvider interface {
|
||||
// The list of homeserver domains to query. These servers will receive a request
|
||||
// via this API: https://matrix.org/docs/spec/server_server/latest#public-room-directory
|
||||
// This will be called -on demand- by clients, so cache appropriately!
|
||||
Homeservers() []string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue