8081d98c67
Initial public release. Anonymous on-device identity (no phone number, e-mail, or password), Signal-protocol cryptography (X3DH + PQXDH, Double Ratchet, sealed sender) via libsignal, a metadata-minimizing relay, group chats, disappearing messages, encrypted local storage, optional Tor transport, and a UI localized into Czech, English, German, Russian, and Italian. Monorepo: Flutter client (app/), Rust relay + wire types (rust/), protobuf definitions (proto/), self-host deploy (deploy/). Licensed under AGPL-3.0 with an app-store distribution exception (§7).
21 lines
937 B
Dart
21 lines
937 B
Dart
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:sepot/core/push/push_service.dart';
|
|
import 'package:sepot/providers/messaging_provider.dart';
|
|
|
|
/// Push vrstva nad messagingem.
|
|
final pushServiceProvider = Provider<PushService>((ref) {
|
|
return PushService(ref.read(messagingServiceProvider));
|
|
});
|
|
|
|
/// Zaregistruje push callbacky, jakmile messaging běží. Push se sám
|
|
/// NEzapíná — jen připraví handlery. Pokud už uživatel dřív distributora
|
|
/// zvolil, obnoví registraci (endpoint se mohl změnit; relay se re-registruje
|
|
/// po AUTH). Watchovat z chat listu vedle messagingStartProvider.
|
|
final pushInitProvider = FutureProvider<void>((ref) async {
|
|
await ref.watch(messagingStartProvider.future);
|
|
final push = ref.read(pushServiceProvider);
|
|
// Obnoví uložený režim (off/UnifiedPush/FCM) — endpoint/token se
|
|
// re-registruje u relaye po každém startu.
|
|
await push.restoreMode();
|
|
});
|