Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

discussion/add - DiscussionID not returned?

edited April 2011 in Vanilla 2.0 - 2.8

the idea for me using this plugin is, to implement discussions into certain pages of my application that are stored and managed in Vanilla.

If a user creates a discussion on a certain page, I want to store the new DiscussionID as a relation in my app.

So I call the "discussion/add"-method of the API.
It works great. The discussion is created and I can see it in the Vanilla Forum. But the problme now is, that the response of the "discussion/add"-call does not return the new DiscussionID which would be essential for me.


  • Options
    Ok, I decided to have a look into the Addon-code myself and it figured out solving this was as easy as adding this to the Add-method of the class.discussioncontroller.php:

    $this->SetJSON("DiscussionID", $DiscussionID);

    Then the new discussion-id is also returned in the JSON-response.

Sign In or Register to comment.