So I have some rather simple code that I use to display a privatemsg link on a particular node. It works OK except it seems to only check if a friend request has been sent or not, so even if the two users are in pending status it would still display the link. What would be the most efficient way to check that they're in an actual relationship?

          if ($relationships = user_relationships_load(array('between' => array($user->uid, $node->uid)))) { 
		  $url = privatemsg_get_link(array(user_load($node->uid)));
		  print bla bla