Fix conversation outcome learning ingestion
This commit is contained in:
1 parent
a85b99ceb6
commit
55a6774daf
3 files changed
+249
-52
No files matched your search
@@ -24,20 +24,21 @@ describe('ChatService progressive full backfill', () => {
|
||||
const repos = createTestRepositories(db);
|
||||
|
||||
try {
|
||||
const sentAt = Date.now();
|
||||
repos.postsRepo.insert({
|
||||
id: 'post-alice',
|
||||
subreddit: 'example',
|
||||
author: 'alice',
|
||||
title: 'Source post',
|
||||
imageUrl: null,
|
||||
processedAt: 1_000,
|
||||
processedAt: sentAt - 1_000,
|
||||
});
|
||||
repos.messagesRepo.insert({
|
||||
postId: 'post-alice',
|
||||
recipient: 'alice',
|
||||
subject: 'alice',
|
||||
message: 'Hello Alice',
|
||||
sentAt: Date.now(),
|
||||
sentAt,
|
||||
strategyId: 'direct',
|
||||
chatRoomId: '!alice:reddit.com',
|
||||
});
|
||||
@@ -51,14 +52,14 @@ describe('ChatService progressive full backfill', () => {
|
||||
event_id: `$reply-${roomId}`,
|
||||
type: 'm.room.message',
|
||||
sender: roomId === '!alice:reddit.com' ? '@t2_alice:reddit.com' : '@t2_bob:reddit.com',
|
||||
origin_server_ts: 2_000,
|
||||
origin_server_ts: sentAt + 1_000,
|
||||
content: { body: 'Hi there' },
|
||||
},
|
||||
{
|
||||
event_id: `$first-${roomId}`,
|
||||
type: 'm.room.message',
|
||||
sender: '@me:reddit.com',
|
||||
origin_server_ts: 1_000,
|
||||
origin_server_ts: sentAt,
|
||||
content: { body: roomId === '!alice:reddit.com' ? 'Hello Alice' : 'Hello Bob' },
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user