def _mark(self, status): """Mark the notification with status on the notify server. Return True if no error, False if error in response""" notif_id = self.notif_id user_id = self.user.user_id raw = notifyapi.update_batch([notif_id], status, user_id) return check_notif_error(raw)
def _mark_notifications(self, status): """Mark all notifications for user as read""" notif_ids = [notif.notif_id for notif in self.get_notifications()] raw = notifyapi.update_batch(notif_ids, status, self.user_id) check_notif_error(raw)