]> git.mxchange.org Git - friendica.git/blobdiff - include/diaspora.php
Bugfix: Avoid warning when posting items and the worker isn't active
[friendica.git] / include / diaspora.php
index db6844f44d609476b984b673d3c591514d338571..10f1be93d24823b8849dcc0190adf69348e7a1e0 100644 (file)
@@ -2876,8 +2876,10 @@ class diaspora {
                                        "created_at" => $created,
                                        "provider_display_name" => $item["app"]);
 
-                       if (count($location) == 0)
+                       // Diaspora rejects messages when they contain a location without "lat" or "lng"
+                       if (!isset($location["lat"]) OR !isset($location["lng"])) {
                                unset($message["location"]);
+                       }
 
                        $type = "status_message";
                }