mirror of
https://github.com/kennethnym/freya
synced 2026-06-23 01:44:55 +01:00
feat: add conversation storage (#140)
This commit is contained in:
@@ -44,6 +44,20 @@ mock.module("../sources/user-sources.ts", () => ({
|
||||
}),
|
||||
}))
|
||||
|
||||
mock.module("../conversations/storage.ts", () => ({
|
||||
conversations: (_db: Database, userId: string) => ({
|
||||
async getOrCreateConversation() {
|
||||
return { id: `conversation-${userId}` }
|
||||
},
|
||||
async listEntries() {
|
||||
return []
|
||||
},
|
||||
async appendEntry() {
|
||||
return { id: "entry-1", sequence: 1 }
|
||||
},
|
||||
}),
|
||||
}))
|
||||
|
||||
function createStubSource(id: string): FeedSource {
|
||||
return {
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user