Skip to content

Commit

Permalink
fix: anonymous post should not be visible in my post (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadadeeltajamul authored Jan 25, 2024
1 parent bb341df commit fa83570
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/discussions/posts/data/slices.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ const threadsSlice = createSlice({
...(state.threadsInTopic[payload.topicId] || []),
payload.id,
];
// Temporarily add it to the top of the list so it's visible
state.pages[0] = [payload.id].concat(state.pages[0] || []);
if (!payload.anonymousToPeers) {
// Temporarily add it to the top of the list so it's visible
state.pages[0] = [payload.id].concat(state.pages[0] || []);
}
state.avatars = { ...state.avatars, ...payload.avatars };
state.redirectToThread = { topicId: payload.topicId, threadId: payload.id };
state.threadDraft = null;
Expand Down

0 comments on commit fa83570

Please sign in to comment.