<commit_before>// We use these when displaying notifications in the notificationsDrawer

// gets all activities associated with the current user
Meteor.publish('notificationActivities', () => {
  return activities();
});

// gets all attachments associated with activities associated with the current user
Meteor.publish('notificationAttachments', function() {
  return Attachments.find({
    _id: {
      $in: activities()
        .map(v => v.attachmentId)
        .filter(v => !!v),
    },
  });
});

// gets all cards associated with activities associated with the current user
Meteor.publish('notificationCards', function() {
  return Cards.find({
    _id: {
      $in: activities()
        .map(v => v.cardId)
        .filter(v => !!v),
    },
  });<commit_msg>fixup! Ref: Attachments to use modern gridfs (rm localstore)<commit_after>// We use these when displaying notifications in the notificationsDrawer

// gets all activities associated with the current user
Meteor.publish('notificationActivities', () => {
  return activities();
});

// gets all attachments associated with activities associated with the current user
Meteor.publish('notificationAttachments', function() {
  return Attachments.find({
    _id: {
      $in: activities()
        .map(v => v.attachmentId)
        .filter(v => !!v),
    }.cursor,
  });
});

// gets all cards associated with activities associated with the current user
Meteor.publish('notificationCards', function() {
  return Cards.find({
    _id: {
      $in: activities()
        .map(v => v.cardId)
        .filter(v => !!v),
    },
  });
{'fraction_non_alphanumeric': 0.1317780580075662, 'fraction_numerical': 0.0, 'mean_word_length': 3.383977900552486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '654216', 'n_tokens_mistral': 449, 'n_tokens_neox': 430, 'n_words': 139}