Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
exmFeed recipientType add
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerelsukh committed Oct 10, 2023
1 parent 21823c5 commit a75927b
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,19 @@ const exmFeedQueries = {
filter.contentType = { $in: contentTypes };
}

if (contentTypes && contentTypes.includes('bravo')) {
if (recipientType === 'recieved') {
filter.recipientIds = { $in: [user._id] };
} else if (recipientType === 'sent') {
filter.createdBy = user._id;
} else {
filter.$or.push(
{ recipientIds: { $in: [user._id] } },
{ createdBy: user._id }
);
}
}

if (isPinned !== undefined) {
if (isPinned) {
filter.isPinned = true;
Expand Down

0 comments on commit a75927b

Please sign in to comment.