Show Reddit post age in conversations
This commit is contained in:
1 parent
7db60e8839
commit
50f9f8a6aa
14 files changed
+65
-11
No files matched your search
@@ -296,6 +296,7 @@ describe('conversations route', () => {
|
||||
chatRoomId: 'room-alice', subreddit: 'example', postTitle: 'Exact source post',
|
||||
postUrl: 'https://www.reddit.com/r/example/comments/post-exact/exact_source_post/',
|
||||
postImageUrl: 'https://i.redd.it/exact-source.jpg',
|
||||
postCreatedAt: 8,
|
||||
};
|
||||
const latestRecipientOrigin = { ...roomOrigin, postId: 'wrong-latest-post', postTitle: 'Wrong post' };
|
||||
const context = {
|
||||
@@ -318,7 +319,7 @@ describe('conversations route', () => {
|
||||
const body = await response.json();
|
||||
expect(body.triggeringPost).toEqual({
|
||||
id: 'post-exact', subreddit: 'example', title: 'Exact source post',
|
||||
url: roomOrigin.postUrl, imageUrl: roomOrigin.postImageUrl, sentAt: 9,
|
||||
url: roomOrigin.postUrl, imageUrl: roomOrigin.postImageUrl, postedAt: 8, sentAt: 9,
|
||||
});
|
||||
expect(body.messages[0]).toMatchObject({ text: 'Hello', isAi: true });
|
||||
expect(context.repos.messages.getLatestByRecipient).not.toHaveBeenCalled();
|
||||
|
||||
Reference in new issue
Block a user