class EventListFeed extends FlattenableFeed<List<Event>> {

    @Override
    public List<Event> flatten() {
        if(events == null) {
            return new ArrayList<>();
        }
        for(Event event : events) {
            event.setUser(users.get(event.getUserId()));
            event.setPost(posts.get(event.getPostId()));
        }
        return events;
    }

}