This commit is contained in:
notfire 2024-12-09 18:06:25 -05:00
parent 93e7742c61
commit 8de36b13dd
No known key found for this signature in database
GPG key ID: 3AFDACAAB4E56B16
2 changed files with 5 additions and 4 deletions

View file

@ -21,10 +21,10 @@ $contentR = $arr["responsetext"];
if ($arr["iscwed"] == "t") {
$contentCW = $arr["cw"];
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(array('status' => "question: {$contentO}\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated); cw: {$contentCW}")));
http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated); cw: {$contentCW}")));
} else {
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(array('status' => "question: {$contentO}\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated)")));
http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated)")));
}
curl_exec($ch);

View file

@ -14,8 +14,9 @@ if ($_GET["text"] !== null) {
SET \"responsetext\" = '{$text}', \"responsetime\" = timestamptz'{$cdate}', isrespondedto = True
WHERE id = {$id};
";
pg_query($db, $query);
pg_update($db, "data", array("responsetext" => $text, "responsetime" => "timestamptz'{$cdate}", "isrespondedto" => "True"), array("id" => $id));
if ($fediEnabled) {
include 'fedi.php';