fixing output for matrix message

This commit is contained in:
w0bm
2024-02-18 15:20:35 +00:00
parent bae8bcae6c
commit 289e5ea82e
5 changed files with 2 additions and 4 deletions

View File

@@ -167,7 +167,7 @@ class VideoController extends Controller
if (config('matrix.enabled') && config('matrix.token') && config('matrix.homeserver') && config('matrix.room')) {
$nsfw = in_array('nsfw', $video->getTagArrayNormalizedAttribute());
$nsfw = $nsfw ? ' :exclamation: **NSFW** :exclamation:' : '';
$nsfw = $nsfw ? ' NSFW' : '';
$message = config('matrix.message');
$message = str_replace(
['<USER>', '<ID>', '<NSFW>'],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 359 KiB

View File

@@ -1 +0,0 @@
{"errcode":"M_UNKNOWN","error":"'body' not a string type"}

View File

@@ -1 +0,0 @@
{"event_id":"$RcOS8ZN5HNujEnr9cEjFb-2UJ3A7pj0rSm4RiSZ9WIk"}

View File

@@ -4,5 +4,5 @@ return [
'homeserver' => env('MATRIX_HOMESERVER'),
'room' => env('MATRIX_ROOMID'),
'token' => env('MATRIX_TOKEN'),
'message' => '<USER> uploaded a new webm: https://w0bm.com/<ID><NSFW>',
'message' => '<USER> uploaded a new <NSFW> webm: https://w0bm.com/<ID>',
];