Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
668 views
in Plugins by
Hi,

I'm working on a Mattermost integration and want to be able to filter questions that should be postet to Mattermost by tags and categories. Tags work already, but it seems that the categoryid field in the $params parameter is always empty.
Q2A version: 1.7.4

1 Answer

0 votes
by

Can be retrieved by a query on ^posts using postid rt?
But I checked my database and categoryid seems to be working fine - Adding one entry below.

 2016-08-20 14:17:31 | 163.47.13.245   |    500 | jothee               |  1366941005117545725 | q_post | postid=63966    parentid=    parent=    title=UGCNET-June2016-III-40    content=<p>Which of the following statements i...    format=html    text=Which of the following statements is c...    tags=ugcnetjune2016iii    categoryid=62    extra=    name=    notify=    email=

by
It is not a problem with categories themselves.
According to http://docs.question2answer.org/plugins/modules-event/
"The $params array contains full details about the new post, including its ID in $params['postid'] and textual content in $params['text']. If the post was queued for moderation, this event will only be sent once it is approved."
And it also includes a category field. But this field is empty.
Can you tell me the exact code to query the category from the process_event() medthod?
...