]> git.mxchange.org Git - friendica.git/blobdiff - mod/notify.php
Double check for maximum number of workers
[friendica.git] / mod / notify.php
index 256bb77932bfb9ea304de9a3be94b2998281b2cb..02260514af91493b287a06438fd799e016c224e5 100644 (file)
@@ -17,6 +17,17 @@ function notify_init(&$a) {
                                dbesc($r[0]['otype']),
                                intval(local_user())
                        );
+
+                       // The friendica client has problems with the GUID. this is some workaround
+                       if ($a->is_friendica_app()) {
+                               require_once("include/items.php");
+                               $urldata = parse_url($r[0]['link']);
+                               $guid = basename($urldata["path"]);
+                               $itemdata = get_item_id($guid, local_user());
+                               if ($itemdata["id"] != 0)
+                                       $r[0]['link'] = $a->get_baseurl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
+                       }
+
                        goaway($r[0]['link']);
                }