]> git.mxchange.org Git - friendica.git/commitdiff
Maybe this solves the slapper problems ...
authorMichael Vogel <icarus@dabo.de>
Sun, 13 Dec 2015 11:12:32 +0000 (12:12 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 13 Dec 2015 11:12:32 +0000 (12:12 +0100)
include/ostatus.php

index cd0ba9bb0e9281c5ea94900c9022b3f8c40ed79f..d651fed12bb2c4cd27e556fd697fd2b0a0526dd7 100644 (file)
@@ -1514,6 +1514,15 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false)
                        if ($t[0] == "@")
                                $mentioned[$t[1]] = $t[1];
 
+       // Make sure that mentions are accepted (GNU Social has problems with mixing HTTP and HTTPS)
+       // Not sure if that will really work.
+       $newmentions = array();
+       foreach ($mentioned AS $mention) {
+               $newmentions[str_replace("http://", "https://", $mention)] = str_replace("http://", "https://", $mention);
+               $newmentions[str_replace("https://", "http://", $mention)] = str_replace("https://", "http://", $mention);
+       }
+       $mentioned = $newmentions;
+
        foreach ($mentioned AS $mention) {
                $r = q("SELECT `forum`, `prv` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s'",
                        intval($owner["uid"]),