implemented an E2E-encrypted Nextcloud push-v2 notification system with support for RSA decryption and signature verification; introduced an iOS Notification Service Extension and native AppDelegate handlers for Talk actions (inline reply and mark-as-read); replaced the legacy notification registration with a new lifecycle managing app passwords and secure keypair storage; added background message handling with tray synchronization and a test notification utility in the settings.

This commit is contained in:
2026-07-04 22:50:18 +02:00
parent 32f7c311bc
commit 74a2ddd17f
56 changed files with 2987 additions and 285 deletions
+29
View File
@@ -0,0 +1,29 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:marianum_mobile/push/nid_store.dart';
void main() {
group('NidEntry', () {
test('round-trips through JSON with a chat token', () {
const entry = NidEntry(
nid: 42,
notificationId: 42,
tag: 'talk_abc123',
chatToken: 'abc123',
);
final restored = NidEntry.fromJson(entry.toJson());
expect(restored.nid, 42);
expect(restored.notificationId, 42);
expect(restored.tag, 'talk_abc123');
expect(restored.chatToken, 'abc123');
});
test('omits the chat token when absent', () {
const entry = NidEntry(nid: 7, notificationId: 7, tag: 'nc_7');
final json = entry.toJson();
expect(json.containsKey('chatToken'), isFalse);
final restored = NidEntry.fromJson(json);
expect(restored.chatToken, isNull);
expect(restored.tag, 'nc_7');
});
});
}