There are a few interrelated issues with this one:
1. When using the GroupActivity stream and prepending an ActivityStatus to it, the HB message doesn't contextually store the in_group or nid of the Group.
Here is what I did as a work-around until this is fixed. In /includes/heartbeatactivity.inc added this code on line 97:
// Detect group
if (arg(0) == 'node' && is_numeric(arg(1))) {
// If this group exists and is active
if($og_id = db_query("SELECT gid
FROM {og}
WHERE state = 1
AND etid = ". arg(1) ."
LIMIT 1")->fetchAll()) {
// If the user is a member of this group
if(db_query("SELECT id
FROM {og_membership}
WHERE state = 1
AND entity_type = 'user'
AND gid = ". $og_id[0]->gid ."
AND etid = ". $this->uid)->fetchAll()) {
$data['in_group'] = 1;
$data['nid'] = arg(1);
} else {
return FALSE;
}
}
}
2. After adding the code above, when you save an ActivityStatus on the GroupActivity stream, the stream does not automatically update with the new message.
3. Also, even with polling turned on, the ActivityStatus message doesn't appear.
Thanks, I'm really hoping that since the user's have context with ActivityStatus, this OG context can get going without much hassle.
Comments
Comment #1
Stalski commentedHi
1. I added a line of code to set the in_group when loggig from activity status plugin.
(btw your workaround may not be the most elegant way and it is not very secure)
2. and 3. the logging and polling works fine here.
I'll do some more testing now ...
Comment #2
Stalski commentedI found another small bug but now it seems to work nicely here. I pushed the left over fixes to git.
Comment #3
KorbenDallas commentedThanks!!