Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
testing with in mem decryption
Browse files Browse the repository at this point in the history
  • Loading branch information
Boehrsi committed May 14, 2020
1 parent 471cc38 commit 3dc2211
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/src/push/push_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,15 @@ class PushManager {
final pushChatMessage = _getPushChatMessage(decryptedContent);
final fromEmail = pushChatMessage.fromEmail;
final context = Context();
final body = await context.decryptInMemory(pushChatMessage.contentType, pushChatMessage.content, fromEmail);
print("dboehrs starting decrypt for content $pushChatMessage");

var contentType = pushChatMessage.contentType;
if (contentType.isNullOrEmpty()) {
contentType = "text/plain; charset=utf-8";
print("dboehrs manually setting content type to avoid null / empty value");
}
final body = await context.decryptInMemory(contentType, pushChatMessage.content, fromEmail);
print("dboehrs decrypt done with result: $body");
_logger.info("Chat message received from: $fromEmail");
await _notificationManager.showNotificationFromPushAsync(fromEmail, body);
}
Expand Down

0 comments on commit 3dc2211

Please sign in to comment.