- if (($item["id"] != $item["parent"]) && (normalise_link($item["author-link"]) != normalise_link($owner["url"]))) {
- logger("OStatus entry is from author ".$owner["url"]." - not from ".$item["author-link"].". Quitting.", LOGGER_DEBUG);
+ if (($item["id"] != $item["parent"]) && (Strings::normaliseLink($item["author-link"]) != Strings::normaliseLink($owner["url"]))) {
+ Logger::log("OStatus entry is from author ".$owner["url"]." - not from ".$item["author-link"].". Quitting.", Logger::DEBUG);
+ }
+
+ if (!$toplevel) {
+ if (!empty($item['title'])) {
+ $title = BBCode::convert($item['title'], false, 7);
+ } else {
+ $title = sprintf("New note by %s", $owner["nick"]);
+ }
+ } else {
+ $title = sprintf("New comment by %s", $owner["nick"]);