Yuval Z, I haven't heard anything from Ryan - would you know anyone else who may even be able to point me roughly in the right direction for this? Do you think Mark Weitzel might be able to help?
Many thanks, Henry
1 person found this helpful
I haven't actually tried this via the REST API, but internally we do this same thing. The only difference in our implementation is that its not jivemacro="user", it should be:
Thanks for the feedback, James. Let me know if that does the trick, Henry...
Thanks for your input but I'm still having problems with this I'm afraid! My basis was the link HTML that's sent to /__services/v2/rest/draft when @mentioning in any native Jive content item (discussion, document, etc.), which is as follows:
If I submit this exact html as the content.text posted to osapi.jive.corev3.discussions.create, in the resulting content item the name is styled as it should be, but there's no hover over for the user and the user's stream is not updated with the mention.
If, as you've suggested, I change this to:
then the content.content.text attribute of the response from osapi.jive.corev3.discussions.create contains the following in place of the entire <a>...</a> link above:
\u003cspan\u003eThe specified item was not found.\u003c/span\u003e
and if I then edit the HTML of the content item, it shows:
This seems to suggests that the macro is now being processed, but the parameters are maybe incorrect? The user ID I'm populating data-id & __default_attr with is that returned in the content.id attribute from the call to
as returned by the osapi.jive.corev3.search.requestPicker(..) when I search and select for the user in question (Henry Bruce). Is this incorrect? Should I be passing some additional parameters as well?
Unfortunately, I don't have this code running consistently in the Jive Dev Sandbox, but I can focus on fixing the one (performance) related problem that's preventing this, if it would be easier for you to see it first-hand.
While it may be late, this is what we are using against Jive 7:
"text": "<body><p><a href=\"/people/username\" data-username=\"username\" data-userid=\"userid\" class=\"jive-username-link jiveTT-hover-user\">fullname</a></body>"
Maybe that will help?