forked from coracle/flotilla
Improve room join/leave
This commit is contained in:
@@ -81,7 +81,6 @@
|
||||
|
||||
onMount(() => {
|
||||
editor = createEditor(getChatViewOptions(event.content))
|
||||
console.log($editor)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ export const makeSpacePath = (url: string, extra = "") => {
|
||||
let path = `/spaces/${nip19.nrelayEncode(url)}`
|
||||
|
||||
if (extra) {
|
||||
path += "/" + extra
|
||||
path += "/" + encodeURIComponent(extra)
|
||||
}
|
||||
|
||||
return path
|
||||
|
||||
+14
-4
@@ -69,10 +69,6 @@ export const deriveEvent = (idOrAddress: string, hints: string[] = []) => {
|
||||
)
|
||||
}
|
||||
|
||||
// Topics
|
||||
|
||||
export const topicsByUrl = withGetter(writable(new Map<string, string[]>()))
|
||||
|
||||
// Membership
|
||||
|
||||
export type Membership = {
|
||||
@@ -185,6 +181,20 @@ export const {
|
||||
},
|
||||
})
|
||||
|
||||
// Topics
|
||||
|
||||
export const topicsByUrl = derived(chats, $chats => {
|
||||
const $topicsByUrl = new Map<string, string[]>()
|
||||
|
||||
for (const chat of $chats) {
|
||||
if (chat.topic) {
|
||||
pushToMapKey($topicsByUrl, chat.url, chat.topic)
|
||||
}
|
||||
}
|
||||
|
||||
return $topicsByUrl
|
||||
})
|
||||
|
||||
// User stuff
|
||||
|
||||
export const userProfile = derived([pubkey, profilesByPubkey], ([$pubkey, $profilesByPubkey]) => {
|
||||
|
||||
Reference in New Issue
Block a user