Welshman Docs / @welshman/app / RoomLists
Class: RoomLists
Defined in: plugins/roomLists.ts:18
NIP-51 kind-10009 room lists (relays the user belongs to, and the rooms on them), keyed by pubkey. Loaded via the outbox model (the author's write relays), so it depends on the relay-list collection.
Extends
Constructors
Constructor
new RoomLists(
app):RoomLists
Defined in: plugins/roomLists.ts:19
Parameters
app
Returns
RoomLists
Overrides
Properties
all
all:
Projection<RoomListReader[]>
Defined in: plugins/base.ts:167
Inherited from
app
protectedreadonlyapp:IApp
Defined in: plugins/base.ts:175
Inherited from
forceLoad
forceLoad: (
key, ...args) =>Promise<Maybe<RoomListReader>>
Defined in: plugins/base.ts:170
Parameters
key
string
args
...any[]
Returns
Promise<Maybe<RoomListReader>>
Inherited from
index
readonlyindex:ItemCollection<RoomListReader>
Defined in: plugins/base.ts:176
Inherited from
load
load: (
key, ...args) =>Promise<Maybe<RoomListReader>>
Defined in: plugins/base.ts:169
Parameters
key
string
args
...any[]
Returns
Promise<Maybe<RoomListReader>>
Inherited from
one
one: (
key?, ...args) =>Readable<Maybe<RoomListReader>>
Defined in: plugins/base.ts:168
Parameters
key?
string
args
...any[]
Returns
Readable<Maybe<RoomListReader>>
Inherited from
Methods
addRelay()
addRelay(
url):Promise<Command>
Defined in: plugins/roomLists.ts:49
Parameters
url
string
Returns
Promise<Command>
addRoom()
addRoom(
roomId,url):Promise<Command>
Defined in: plugins/roomLists.ts:44
Parameters
roomId
string
url
string
Returns
Promise<Command>
fetch()
fetch(
pubkey,relayHints?):Promise<TrustedEvent|undefined>
Defined in: plugins/roomLists.ts:27
Parameters
pubkey
string
relayHints?
string[] = []
Returns
Promise<TrustedEvent | undefined>
Overrides
get()
get(
key):RoomListReader|undefined
Defined in: plugins/base.ts:190
Parameters
key
string
Returns
RoomListReader | undefined
Inherited from
migrateRelay()
Defined in: plugins/roomLists.ts:57
Parameters
oldUrl
string
newUrl
string
Returns
project()
project<
U>(key,read):Projection<U>
Defined in: plugins/base.ts:192
Type Parameters
U
U
Parameters
key
string
read
(item) => U
Returns
Projection<U>
Inherited from
pubkeysForUrl()
pubkeysForUrl(
url):Projection<string[]>
Defined in: plugins/roomLists.ts:36
Parameters
url
string
Returns
Projection<string[]>
removeRelay()
removeRelay(
url):Promise<Command>
Defined in: plugins/roomLists.ts:51
Parameters
url
string
Returns
Promise<Command>
removeRoom()
removeRoom(
roomId,url?):Promise<Command>
Defined in: plugins/roomLists.ts:46
Parameters
roomId
string
url?
string
Returns
Promise<Command>
roomsForUrl()
roomsForUrl(
pubkey,url):Projection<string[]>
Defined in: plugins/roomLists.ts:33
Parameters
pubkey
string
url
string
Returns
Projection<string[]>
setRelays()
setRelays(
urls):Promise<Command>
Defined in: plugins/roomLists.ts:53
Parameters
urls
string[]
Returns
Promise<Command>
update()
update(
fn):Promise<Command>
Defined in: plugins/roomLists.ts:41
Parameters
fn
(writer) => void
Returns
Promise<Command>
urls()
urls(
pubkey):Projection<string[]>
Defined in: plugins/roomLists.ts:31
Parameters
pubkey
string
Returns
Projection<string[]>