From cb5b1550839042ca83e700af3048369b5c0460b3 Mon Sep 17 00:00:00 2001
From: Michael <heluecht@pirati.ca>
Date: Wed, 20 Sep 2017 21:47:12 +0000
Subject: [PATCH] Bugfix: The API picture upload created an invalid link

---
 include/api.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/api.php b/include/api.php
index 45c9ed2554..bd579bf19a 100644
--- a/include/api.php
+++ b/include/api.php
@@ -3988,7 +3988,7 @@ $called_api = null;
 				);
 
 		// adds link to the thumbnail scale photo
-		$arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $owner_record[0]['name'] . '/image/' . $hash . ']'
+		$arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $owner_record[0]['nick'] . '/image/' . $hash . ']'
 					. '[img]' . System::baseUrl() . '/photo/' . $hash . '-' . "2" . '.'. $typetoext[$filetype] . '[/img]'
 					. '[/url]';