Index: flag_friend.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag_friend/flag_friend.module,v
retrieving revision 1.3.4.14
diff -u -p -r1.3.4.14 flag_friend.module
--- flag_friend.module	22 Mar 2009 19:15:52 -0000	1.3.4.14
+++ flag_friend.module	24 Mar 2009 23:13:34 -0000
@@ -612,8 +612,29 @@ function flag_friend_popups() {
 }
 
 /**
-* Implementation of hook_preprocess_author_pane().
-*/
+ * Implementation of hook_activity_grants().
+ */
+function flag_friend_activity_grants($activity) {
+  return array(
+    $activity->uid, // the module_id that will be used
+  );
+}
+
+/**
+ * Implementation of hook_activity_access_grants().
+ */
+function flag_friend_activity_access_grants($account) {
+  $friends = flag_friend_get_friends($account->uid);
+  $realm_ids = array();
+  if (!empty($friends)) {
+    $realm_ids = array_keys($friends);
+  }
+  return $realm_ids;
+}
+
+/**
+ * Implementation of hook_preprocess_author_pane().
+ */
 function flag_friend_preprocess_author_pane(&$variables) {
   global $user;
   $account_id = $variables['account']->uid;
