mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
Filter out private events
This commit is contained in:
@ -53,6 +53,13 @@ export const useGetEvents = () => {
|
||||
index === self.findIndex(e => e.id === event.id)
|
||||
);
|
||||
|
||||
allEvents = allEvents.filter(event => {
|
||||
if (event.private) {
|
||||
return event.creatorId === userId;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
return await Promise.all(
|
||||
allEvents.map(async (event) => {
|
||||
const profileSnapshot = await db
|
||||
|
||||
Reference in New Issue
Block a user