ActivityFeed.fromReleaseApprovalRequest constructor

ActivityFeed.fromReleaseApprovalRequest({
  1. required String adminProfileId,
  2. required AppRequest request,
  3. required AppProfile authorProfile,
  4. String releaseCoverUrl = '',
})

Factory for release approval request notifications (sent to admins). adminProfileId - Profile ID of the admin who will review request - The AppRequest for release approval authorProfile - Profile of the author submitting the release releaseCoverUrl - Cover image URL of the release

Implementation

ActivityFeed.fromReleaseApprovalRequest({
  required String adminProfileId,
  required AppRequest request,
  required AppProfile authorProfile,
  String releaseCoverUrl = '',
}) :
      id = '',
      ownerId = adminProfileId, // Admin receives the notification
      activityReferenceId = request.id,
      profileId = authorProfile.id,
      profileName = authorProfile.name,
      profileImgUrl = authorProfile.photoUrl,
      mediaUrl = releaseCoverUrl,
      activityFeedType = ActivityFeedType.releaseApprovalRequest,
      createdTime = DateTime.now().millisecondsSinceEpoch,
      message = request.message,
      unread = true;