]> git.mxchange.org Git - friendica.git/commitdiff
add "send pm" link to photo dropdown for Diaspora contacts
authorfriendica <info@friendica.com>
Fri, 16 Mar 2012 22:19:38 +0000 (15:19 -0700)
committerfriendica <info@friendica.com>
Fri, 16 Mar 2012 22:19:38 +0000 (15:19 -0700)
include/conversation.php

index 88ecf502b222e4b66867f0115cc82e8410b6f8e3..8ca484c9e7f8bfa5cc07bf2abb994a28bbca219d 100755 (executable)
@@ -779,6 +779,17 @@ function item_photo_menu($item){
        if(($cid) && (! $item['self'])) {
                $contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid;
                $posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid;
+
+               $clean_url = normalise_link($item['author-link']);
+
+               if((local_user()) && (local_user() == $item['uid'])) {
+                       if(isset($a->contacts) && x($a->contacts,$clean_url)) {
+                               if($a->contacts[$clean_url]['network'] === NETWORK_DIASPORA) {
+                                       $pm_url = $a->get_baseurl($ssl_state) . '/message/new/' . $cid;
+                               }
+                       }
+               }
+
        }
 
        $menu = Array(