export const updateMediaNotifications = async ({ kind }: IMediaNotifications): Promise<IDBNotificationsInfo[] | {}> => {
    return Notifications.find({ kind }).where('time').lte(new Date(Date.now())).then(async (response: IDBNotifications[]) => {
        return Promise.all(response.map(handleMediaNotify));
    }).catch(() => []);
};