when someone posts something in a OG group is their a special way to make sure that gets displayed or does the rule node take care of that?

Posted by admin

Here we have to take care of the "context". when we are in OG, we need to make sure heartbeat knows about the extra contextual variables. In heartbeat templates, variables will become valuable as soon as something gets logged in the database.

 

Underneath a couple of possible cases:

 

  1. "!user posted !title in !group. "
    There are three variables where title is the group post title and group is the top group name.
    The other query variables will be set-up like
    - userId: poster
    - userTargetId: 0 
    - nodeId: the id of the post
    - nodeTargetId: the id of the topgroupname the post is in.
  2. "!user joined !group. "
    There are two variables where group is the top group name.
    The query variables will be like:
    - userId: actor
    - userTargetId: 0
    - nodeId: the (top) group nodeId
    - nodeTargetId: 0
so you could say that you always fill up the nodeId first, but you can add extra node information for group context, node references, ...
When the messages are displayed, they will be public as well. (you could deny those templates through ui for the public stream if you don't want that). The most important thing now is that the streams will be able to query a node id in both cases, so we can only view the activity for that group.