From 4f37f68bd77d9ba26720f1d322729c8af58074f6 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 7 Dec 2023 06:45:23 +0000 Subject: [PATCH 1/2] Fix transmission of events to Diaspora --- src/Content/Text/BBCode.php | 3 +++ src/Protocol/Diaspora.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index e9eeba6118..3bb9fda125 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -2171,6 +2171,9 @@ class BBCode // Maybe we should make this newline at every time before a quote. $text = str_replace(['
'], ['
'], $text); + // The converter doesn't convert these elements + $text = str_replace(['
', '
'], ['

', '

'], $text); + // Now convert HTML to Markdown $text = HTML::toMarkdown($text); diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index cc3016aae9..3f456a6975 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -3310,7 +3310,7 @@ class Diaspora $result = DI::cache()->get($cachekey); if (!is_null($result)) { - return $result; +// return $result; } $myaddr = self::myHandle($owner); @@ -3403,7 +3403,8 @@ class Diaspora if ($item['event-id'] > 0) { $event = self::buildEvent($item['event-id']); if (count($event)) { - $message['event'] = $event; + // Deactivated, since Diaspora seems to have problems with the processing. + // $message['event'] = $event; if ( !empty($event['location']['address']) && From 1301730ed8d6375a326be2cb8b5e22b349d6def9 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 7 Dec 2023 06:52:03 +0000 Subject: [PATCH 2/2] Remove comment --- src/Protocol/Diaspora.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 3f456a6975..59918287ab 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -3310,7 +3310,7 @@ class Diaspora $result = DI::cache()->get($cachekey); if (!is_null($result)) { -// return $result; + return $result; } $myaddr = self::myHandle($owner);