diff --git a/index.php b/index.php index cab9549..3900023 100644 --- a/index.php +++ b/index.php @@ -583,17 +583,22 @@ echo <<< HTML -
-
-
-
-
- -
-
-
- -
+
+ Send a message +
+
+
+ +
+
+
+ +
+
+

+ +
+
HTML; @@ -614,6 +619,13 @@ HTML; // Get the posted content $content = $_POST["content"]; + // Is this a reply? + if ( isset( $_POST["inReplyTo"] ) && filter_var( $_POST["inReplyTo"], FILTER_VALIDATE_URL ) ) { + $inReplyTo = $_POST["inReplyTo"]; + } else { + $inReplyTo = null; + } + // Process the content into HTML to get hashtags etc list( "HTML" => $content, "TagArray" => $tags ) = process_content( $content ); @@ -669,6 +681,7 @@ HTML; "type" => "Note", "published" => $timestamp, "attributedTo" => "https://{$server}/{$username}", + "inReplyTo" => $inReplyTo, "content" => $content, "contentMap" => ["en" => $content], "to" => ["https://www.w3.org/ns/activitystreams#Public"],