Nachrichten 1.1.0: Schnittstelle für die App, Verbindung prüfen

- /api/v1/chat: config, Gruppenchats, verlassen, bearbeiten, löschen, Reaktionen,
  „Gibt es Neues?“, „schreibt …“, GIFs, Echtzeit-Anmeldung und Anhänge mit Token
- Anhang-Adressen zeigen bei API-Aufrufen auf die API (Token statt Sitzung)
- Backend: „Echtzeit prüfen“ und „GIPHY prüfen“ melden sofort, ob die Zugangsdaten stimmen
- README: Schritt-für-Schritt-Einrichtung für pusher.com und GIPHY

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-27 20:10:35 +00:00
parent 2844452002
commit 5f71c3e250
9 changed files with 207 additions and 26 deletions

View file

@ -18,6 +18,8 @@ use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Validation\ValidationException;
use Inhaus\Plugins\Chat\Gifs;
use Inhaus\Plugins\Chat\Realtime;
use UnitEnum;
/**
@ -138,9 +140,23 @@ class ChatSettings extends Page
Notification::make()->success()->title('Gespeichert')->send();
}
/**
* @param array{ok: bool, message: string} $result
*/
private function report(array $result): void
{
Notification::make()->{$result['ok'] ? 'success' : 'danger'}()->title($result['ok'] ? 'Verbindung steht' : 'Das klappt noch nicht')->body($result['message'])->send();
}
protected function getHeaderActions(): array
{
return [
Action::make('checkRealtime')->label('Echtzeit prüfen')->color('gray')->icon(Heroicon::OutlinedSignal)
->visible(fn () => app(Realtime::class)->enabled())
->action(fn () => $this->report(app(Realtime::class)->check())),
Action::make('checkGiphy')->label('GIPHY prüfen')->color('gray')->icon(Heroicon::OutlinedGif)
->visible(fn () => app(Gifs::class)->giphyEnabled())
->action(fn () => $this->report(app(Gifs::class)->checkGiphy())),
Action::make('forgetGiphy')->label('GIPHY ausschalten')->color('gray')
->visible(fn () => filled(app(Settings::class)->get('chat.giphy_key')))
->requiresConfirmation()