Created
August 14, 2023 10:03
-
-
Save marcinwasowicz/38435924b5850515649253a2e490572e to your computer and use it in GitHub Desktop.
Test `PlatformSpecificTools#isStaffRelease`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/native/android/app/src/main/java/app/comm/android/notifications/CommNotificationsHandler.java b/native/android/app/src/main/java/app/comm/android/notifications/CommNotificationsHandler.java | |
index c0b158d98..d15f8919f 100644 | |
--- a/native/android/app/src/main/java/app/comm/android/notifications/CommNotificationsHandler.java | |
+++ b/native/android/app/src/main/java/app/comm/android/notifications/CommNotificationsHandler.java | |
@@ -23,6 +23,7 @@ import app.comm.android.fbjni.GlobalDBSingleton; | |
import app.comm.android.fbjni.MessageOperationsUtilities; | |
import app.comm.android.fbjni.NetworkModule; | |
import app.comm.android.fbjni.NotificationsCryptoModule; | |
+import app.comm.android.fbjni.PlatformSpecificTools; | |
import app.comm.android.fbjni.ThreadOperations; | |
import com.google.firebase.messaging.FirebaseMessagingService; | |
import com.google.firebase.messaging.RemoteMessage; | |
@@ -78,6 +79,10 @@ public class CommNotificationsHandler extends FirebaseMessagingService { | |
@Override | |
public void onMessageReceived(RemoteMessage message) { | |
+ Log.w( | |
+ "COMM", | |
+ "Is Staff Release: " + PlatformSpecificTools.isStaffRelease() + | |
+ " from CommNotificationsHandler."); | |
if (message.getData().get(ENCRYPTED_PAYLOAD_KEY) != null) { | |
try { | |
message = this.decryptRemoteMessage(message); | |
diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | |
index f1582748d..300a861f3 100644 | |
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | |
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | |
@@ -1,6 +1,8 @@ | |
#include "CommCoreModule.h" | |
#include "../CryptoTools/DeviceID.h" | |
#include "../Notifications/BackgroundDataStorage/NotificationsCryptoModule.h" | |
+#include "../Tools/Logger.h" | |
+#include "../Tools/PlatformSpecificTools.h" | |
#include "BaseDataStore.h" | |
#include "DatabaseManager.h" | |
#include "InternalModules/GlobalDBSingleton.h" | |
@@ -538,6 +540,10 @@ jsi::Value CommCoreModule::initializeNotificationsSession( | |
return createPromiseAsJSIValue( | |
rt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) { | |
taskType job = [=, &innerRt]() { | |
+ comm::Logger::log( | |
+ "Is Staff Release: " + | |
+ std::to_string(PlatformSpecificTools::isStaffRelease()) + | |
+ " from CryptoThread"); | |
std::string error; | |
crypto::EncryptedData result; | |
try { | |
@@ -597,6 +603,10 @@ CommCoreModule::CommCoreModule( | |
threadStore(jsInvoker), | |
messageStore(jsInvoker), | |
reportStore(jsInvoker) { | |
+ comm::Logger::log( | |
+ "Is Staff Release: " + | |
+ std::to_string(PlatformSpecificTools::isStaffRelease()) + | |
+ " from CommCoreModule main thread."); | |
GlobalDBSingleton::instance.enableMultithreading(); | |
} | |
diff --git a/native/ios/NotificationService/NotificationService.mm b/native/ios/NotificationService/NotificationService.mm | |
index 807effb03..706801efb 100644 | |
--- a/native/ios/NotificationService/NotificationService.mm | |
+++ b/native/ios/NotificationService/NotificationService.mm | |
@@ -1,6 +1,7 @@ | |
#import "NotificationService.h" | |
#import "Logger.h" | |
#import "NotificationsCryptoModule.h" | |
+#import "PlatformSpecificTools.h" | |
#import "TemporaryMessageStorage.h" | |
#import <mach/mach.h> | |
@@ -55,6 +56,11 @@ size_t getMemoryUsage() { | |
dispatch_source_t memorySource = [self registerForMemoryEvents]; | |
+ comm::Logger::log( | |
+ "Is Staff Release: " + | |
+ std::to_string(comm::PlatformSpecificTools::isStaffRelease()) + | |
+ " from NSE."); | |
+ | |
if ([self shouldBeDecrypted:self.bestAttemptContent.userInfo]) { | |
std::string decryptErrorMessage; | |
try { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment