Skip to content

Commit fa83570

Browse files
fix: anonymous post should not be visible in my post (#654)
1 parent bb341df commit fa83570

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/discussions/posts/data/slices.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ const threadsSlice = createSlice({
133133
...(state.threadsInTopic[payload.topicId] || []),
134134
payload.id,
135135
];
136-
// Temporarily add it to the top of the list so it's visible
137-
state.pages[0] = [payload.id].concat(state.pages[0] || []);
136+
if (!payload.anonymousToPeers) {
137+
// Temporarily add it to the top of the list so it's visible
138+
state.pages[0] = [payload.id].concat(state.pages[0] || []);
139+
}
138140
state.avatars = { ...state.avatars, ...payload.avatars };
139141
state.redirectToThread = { topicId: payload.topicId, threadId: payload.id };
140142
state.threadDraft = null;

0 commit comments

Comments
 (0)