Dont handle activities twice in inbox #133

Merged
dessalines merged 1 commits from inbox-deduplicate-handling into main 2020-11-17 15:43:13 +00:00
Owner

This works fine, and should fix the problem with duplicate websocket notifications (it notified only once in my quick, local test).

For some reason I dont understand, this test is failing (but locking a post federates fine if I try it manually).

● Lock a post

TypeError: Cannot read property 'community_local' of undefined

218 |   let searchBeta2 = await searchPost(beta, postRes.post);
219 |   let betaPost2 = searchBeta2.posts[0];
> 220 |   expect(betaPost2.community_local).toBe(true);
|                    ^
221 |   expect(betaPost2.creator_local).toBe(false);
222 |   expect(betaPost2.locked).toBe(false);
223 |

at src/post.spec.ts:220:20
at step (src/post.spec.ts:33:23)
at Object.next (src/post.spec.ts:14:53)
at fulfilled (src/post.spec.ts:5:58)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
This works fine, and should fix the problem with duplicate websocket notifications (it notified only once in my quick, local test). For some reason I dont understand, this test is failing (but locking a post federates fine if I try it manually). ``` ● Lock a post TypeError: Cannot read property 'community_local' of undefined 218 | let searchBeta2 = await searchPost(beta, postRes.post); 219 | let betaPost2 = searchBeta2.posts[0]; > 220 | expect(betaPost2.community_local).toBe(true); | ^ 221 | expect(betaPost2.creator_local).toBe(false); 222 | expect(betaPost2.locked).toBe(false); 223 | at src/post.spec.ts:220:20 at step (src/post.spec.ts:33:23) at Object.next (src/post.spec.ts:14:53) at fulfilled (src/post.spec.ts:5:58) at processTicksAndRejections (node:internal/process/task_queues:93:5) ```
Owner

I might need to add some more waits in there, but it passed on travis.

https://travis-ci.org/github/LemmyNet/lemmy/builds/744039711

I might need to add some more waits in there, but it passed on travis. https://travis-ci.org/github/LemmyNet/lemmy/builds/744039711
Owner

I tested, this fixed it.

I tested, this fixed it.
dessalines merged commit eb690fc39c into main 2020-11-17 15:43:12 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#133
No description provided.