Skip to content

Commit 71d9f03

Browse files
committed
chats: read chat example
1 parent c11a059 commit 71d9f03

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import ChatsModule from "../dist/index.js";
2+
import {Fetcher, graph, UpdateManager} from "rdflib";
3+
4+
const store = graph();
5+
const fetcher = new Fetcher(store);
6+
const updater = new UpdateManager(store);
7+
8+
const module = new ChatsModule({store, fetcher, updater});
9+
10+
const chat = await module.readChat("http://localhost:3000/alice/public/chats/lobby/index.ttl#this");
11+
12+
console.log(chat.name);
13+
console.table(chat.latestMessages)

0 commit comments

Comments
 (0)