minor updates
This commit is contained in:
@@ -13,7 +13,6 @@ export const useChannels = create((set) => ({
|
||||
export const useChannelMessages = create(
|
||||
immer((set) => ({
|
||||
messages: [],
|
||||
members: new Set(),
|
||||
replyTo: { id: null, pubkey: null, content: null },
|
||||
add: (message: any) => {
|
||||
set((state: any) => ({ messages: [...state.messages, message] }));
|
||||
@@ -36,5 +35,11 @@ export const useChannelMessages = create(
|
||||
state.messages[target]["mute"] = true;
|
||||
});
|
||||
},
|
||||
clear: () => {
|
||||
set(() => ({
|
||||
messages: [],
|
||||
replyTo: { id: null, pubkey: null, content: null },
|
||||
}));
|
||||
},
|
||||
})),
|
||||
);
|
||||
|
||||
@@ -18,4 +18,7 @@ export const useChatMessages = create((set) => ({
|
||||
add: (message: any) => {
|
||||
set((state: any) => ({ messages: [...state.messages, message] }));
|
||||
},
|
||||
clear: () => {
|
||||
set(() => ({ messages: [] }));
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -5,18 +5,16 @@ export const DEFAULT_AVATAR = "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp";
|
||||
export const DEFAULT_CHANNEL_BANNER =
|
||||
"https://bafybeiacwit7hjmdefqggxqtgh6ht5dhth7ndptwn2msl5kpkodudsr7py.ipfs.w3s.link/banner-1.jpg";
|
||||
|
||||
// metadata service
|
||||
export const METADATA_SERVICE = "https://us.rbr.bio";
|
||||
|
||||
// read-only relay list
|
||||
export const READONLY_RELAYS = [
|
||||
"wss://welcome.nostr.wine",
|
||||
"wss://relay.nostr.band",
|
||||
"wss://relay.damus.io",
|
||||
];
|
||||
|
||||
// write-only relay list
|
||||
export const WRITEONLY_RELAYS = [
|
||||
"wss://nostr.mutinywallet.com",
|
||||
"wss://relay.damus.io",
|
||||
"wss://relay.nostr.band",
|
||||
];
|
||||
|
||||
@@ -27,5 +25,5 @@ export const METADATA_RELAY = ["wss://relay.nostr.band"];
|
||||
export const FULL_RELAYS = [
|
||||
"wss://welcome.nostr.wine",
|
||||
"wss://relay.nostr.band",
|
||||
"wss://nostr.mutinywallet.com",
|
||||
"wss://relay.damus.io",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user