3 Replies Latest reply on Jun 16, 2014 1:38 AM by nils.drews

    @Mentioning in Tile Activity Streams

      I'm currently working on some customisations involving pushing data to the Purposeful Places activity stream but having difficulty inserting "@mentions" into the description.


      Using the "tile-activity" Jive example:


      The "Actor" (highlighted in yellow) works as desired with a hover-over working. However, I want the hover-over to also work on the link in the description (underlined in red).

      Any comments with @mentions in them also work as expected (comments added via the standard Jive frontend).


      It would be handy to have in scenarios where multiple @mentions are required. e.g. "@Peter_Lim assigned a new deal to @Adam_Sample", both with a working hover-over to a Jive user.



      I've tried manually inserting @mention links using what should be the correct format into the activity post description using:

      <a class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="2010" data-objecttype="3" href="https://example.jiveon.com/people/peter.lim%40example.com.au" aria-describedby="jive-note-user-body">Peter Lim</a>


      But when I inspect the element after it's been posted, it gets stripped back to:

      <a class="jive-link-email-small" href="peter.lim@example.com.au">Peter Lim</a>



      Is there a special way/format to get the @mention links to work in the activity stream descriptions?



        • Re: @Mentioning in Tile Activity Streams

          Hi Peter,


          on a first glance I can say that we definitely filter for unallowed tags, but I'm just unsure about the attributes.


          When you post the external activity you get back the URL of this activity. When you view it from there, does that show already the behavior? Another thing to validate would be what body value you have in the jiveTileStreamEntry database table. I'm just trying to pinpoint if it gets stripped of these elements when we it gets into the system or when it gets rendered for the user.


          If you can reproduce this on an instance where you cand ebug I recommend to set a breakpoint to

          com.jivesoftware.api.core.v3.providers.content.ExternalStreamActivityProvider#updateStandardFields(com.jivesoftware.community.eae.tile.TileStreamEntry, com.jivesoftware.community.integration.tileinstance.TileInstance, org.json.JSONObject, boolean)

          as the body gets mangled there by the HTML Cleaner. Let's see what we can get from there.

            • Re: @Mentioning in Tile Activity Streams

              Thanks Nils for the response. Unfortunately I don't have access to an on-prem Jive instance I can debug that way (with breakpoints / database access)


              Is there any way to get the HTML cleaner to "skip" certain text/tags? i.e. a way to bypass the cleaner without direct database access?

              Nils Drews wrote:


              When you post the external activity you get back the URL of this activity. When you view it from there, does that show already the behavior?


              Not too sure what you mean by getting back the the URL for the activity. I don't see anything returned via the tile-activity stream integration apart from a log message to say its been posted.

                • Re: @Mentioning in Tile Activity Streams

                  I think this is hidden in the JS code. The pure API call which posts the external activity returns a URL with which you can see the activity. I'll dig into this further later on when I cleaned my plate from other stuff. My local test addon is just playing bad tricks on me thus I couldn't finish the investigations on friday (which includes the debugging I'm suggesting).