Index: heartbeat.module
===================================================================
--- heartbeat.module	(revision 2807)
+++ heartbeat.module	(working copy)
@@ -1692,20 +1692,26 @@
   if ($absolute) {
     $attributes['absolute'] = TRUE;
   }
+  
 
+  
+  // Add a fifth paramter to indicate that there's a group context
+  if( (module_exists('og')) && ($og_context = og_get_group_context()) && ((int) $og_context->nid > 0) ){
+    $attributes['query']['gid'] = $og_context->nid;
+  }
+    
   // Blocks link to the pages
   if (!$page && !$ajax_pager) {
     return '<div class="more fullarchive">' . l(t('Full list'), $path, $attributes) . '</div>';
   }
   else {
-
     $path .= '/' . $offset_time;
 
     // Add a fourth paramter to indicate that where on a profile page.
     if (arg(0) == 'user' && is_numeric(arg(1)) && variable_get('heartbeat_show_user_profile_messages_' . $heartbeatAccess->getStream()->name, 0)) {
       $path .= '/' . arg(1);
     }
-
+   
     if ($ajax_pager) {
       $attributes['attributes']['onclick'] = 'javascript:Drupal.heartbeat.getOlderMessages(this, ' . (int)$page . '); return false;';
     }
Index: heartbeat.pages.inc
===================================================================
--- heartbeat.pages.inc	(revision 2807)
+++ heartbeat.pages.inc	(working copy)
@@ -47,7 +47,13 @@
       $account = heartbeat_user_load($account);
     }
   }
-
+  
+  // If we're in a group context, let's make HB aware of it.
+  if (module_exists('og') && is_numeric($og_nid = $_GET['gid']) && (int) $og_nid > 0) {
+		$group_node = node_load($og_nid);
+		og_set_group_context($group_node);
+  }
+  
   // Message streams for each access type
   $context = heartbeat_stream_view($access_type, $page, $offset_time, $ajax, $account);
 
Index: modules/og_activity/ogheartbeat.inc
===================================================================
--- modules/og_activity/ogheartbeat.inc	(revision 2807)
+++ modules/og_activity/ogheartbeat.inc	(working copy)
@@ -22,10 +22,17 @@
   protected $group = NULL;
 
   public function construct() {
+		$group_context = og_get_group_context();
+		if( (int) $group_context->nid > 0){
+			$nid = (int) $group_context->nid;
+		}
+		else{
+			$nid = 0;
+		}
 
     // Where the user id is a member of the group
     // and where the nid target is the group nid
-    $this->setGroup();
+    $this->setGroup($nid);
 
   }
 
