• Admin NodeBB

    This is coming in 0.5.1. Previously this hook was passed a topic id and an array of posts. It was assumed that all the posts are from the same topic but this is no longer the case. So the topic id is removed. If you are using this hook you can get a list of the topic ids from the posts array. See this commit for the change.

    In your plugin you can just retrieve the tids if you need them from the posts array like so

    function (data, callback) {
      var tids = data.posts.map(function(post){
        return post.tid;
      });
      ...
    }
    

Suggested Topics

| |