update channel model

This commit is contained in:
Ren Amamiya
2023-04-25 10:17:36 +07:00
parent 53fd29ddb8
commit 08d2625d36
10 changed files with 168 additions and 129 deletions

View File

@@ -5,7 +5,6 @@ import { DEFAULT_RELAYS } from '@stores/constants';
import { dateToUnix, hoursAgo } from '@utils/getDate';
import {
countTotalNotes,
createChannel,
createChat,
createNote,
getActiveAccount,
@@ -61,16 +60,6 @@ export function Page() {
until: dateToUnix(now.current),
});
}
// kind 40 (channels) query
/*
if (channels.total === 0) {
query.push({
kinds: [40],
since: 0,
until: dateToUnix(now.current),
});
}
*/
// subscribe relays
const unsubscribe = pool.subscribe(
query,
@@ -111,10 +100,6 @@ export function Page() {
''
);
break;
// channel
case 40:
createChannel(event.id, event.content, event.created_at);
break;
default:
break;
}