

def get_activity_slice(self, start=None, stop=None, rehydrate=True):
    '\n        Retrieves a slice of aggregated activities and annotates them as read and/or seen.\n        '
    activities = super(BaseNotificationFeed, self).get_activity_slice(start, stop, rehydrate)
    if (activities and (self.markers_storage_class is not None)):
        if (self.track_unseen and self.track_unread):
            (unseen_ids, unread_ids) = self.feed_markers.get('unseen', 'unread')
        elif self.track_unseen:
            unseen_ids = self.feed_markers.get('unseen')
        elif self.track_unread:
            unread_ids = self.feed_markers.get('unread')
        for activity in activities:
            if self.track_unseen:
                activity.is_seen = (activity.serialization_id not in unseen_ids)
            if self.track_unread:
                activity.is_read = (activity.serialization_id not in unread_ids)
    return activities

dataset/ETHPy150Open tschellenbach/Stream-Framework/stream_framework/feeds/notification_feed/base.py BaseNotificationFeed.get_activity_slice/original