mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 00:24:53 +00:00
- Fixed events fetching in family view because there are events that don't have the private field
- Implemented marking events as private
This commit is contained in:
@ -12,5 +12,6 @@ export interface EventData {
|
||||
reminders?: string[]
|
||||
id?: string | number,
|
||||
attendees?: string[],
|
||||
location?: string
|
||||
location?: string,
|
||||
private?: boolean
|
||||
}
|
||||
@ -29,7 +29,7 @@ const fetchEvents = async (userId: string, profileData: UserProfile | undefined,
|
||||
|
||||
if (isFamilyView || profileData?.userType === ProfileType.FAMILY_DEVICE) {
|
||||
constraints = [
|
||||
eventsQuery.where("familyId", "==", familyId).where("private", "==", false),
|
||||
eventsQuery.where("familyId", "==", familyId).where("private", "not-in", [true]),
|
||||
eventsQuery.where("creatorId", "==", userId),
|
||||
eventsQuery.where("attendees", "array-contains", userId)
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user