Skip to content

Instantly share code, notes, and snippets.

View marcinwasowicz's full-sized avatar

marcinwasowicz

View GitHub Profile
import sys
from naoqi import ALProxy
import time
from threading import Thread
EPSILON = 1e-1
def hand_movement(motionProxy, close=False):
if close:
motionProxy.closeHand("LHand")
else:
Showing Recent Errors Only
Build target NotificationService of project Comm with configuration Debug
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'NotificationService' from project 'Comm')
cd /Users/jacek/Documents/Comm/comm/native/ios
export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name NotificationService -O -enable-batch-mode -enforce-exclusivity\=checked @/Users/jacek/Library/Developer/Xcode/DerivedData/Comm-gembaefwwleskueybwaruathhwho/Build/Intermediates.noindex/Comm.build/Debug-iphonesimulator/NotificationService.build/Objects-normal/arm64/NotificationService.SwiftFileList -D COCOAPODS -Xcc -fmodule-map-file\=/Users/jacek/Library/Developer/Xcode/DerivedData/Comm-gembaefwwleskueybwaruathhwh
@marcinwasowicz
marcinwasowicz / NotificationService.mm
Created February 23, 2023 13:31
Test NotificationService.mm
#import "NotificationService.h"
#import "TemporaryMessageStorage.h"
@interface NotificationService ()
@property(nonatomic, strong) void (^contentHandler)
(UNNotificationContent *contentToDeliver);
@property(nonatomic, strong) UNMutableNotificationContent *bestAttemptContent;
@end
diff --git a/native/ios/NotificationService/NotificationService.mm b/native/ios/NotificationService/NotificationService.mm
index 7a8474632..7d7111261 100644
--- a/native/ios/NotificationService/NotificationService.mm
+++ b/native/ios/NotificationService/NotificationService.mm
@@ -1,5 +1,6 @@
#import "NotificationService.h"
#import "Logger.h"
+#import "NotificationsCryptoModule.h"
#import "TemporaryMessageStorage.h"
diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
index 82dec8325..602b15d95 100644
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -59,6 +59,7 @@ import { fetchCollapsableNotifs } from '../fetchers/message-fetchers.js';
import { fetchServerThreadInfos } from '../fetchers/thread-fetchers.js';
import { fetchUserInfos } from '../fetchers/user-fetchers.js';
import type { Viewer } from '../session/viewer.js';
+import { encryptAndUpdateOlmSession } from '../updaters/olm-session-updater.js';
import { getENSNames } from '../utils/ens-cache.js';
@marcinwasowicz
marcinwasowicz / gist:873ec48a8b332c1e2324771d52e11ee0
Created May 18, 2023 16:00
Add encrypted field to Android notification.
diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
index 9dc0c084d..3e33419fa 100644
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -64,6 +64,7 @@ import { fetchCollapsableNotifs } from '../fetchers/message-fetchers.js';
import { fetchServerThreadInfos } from '../fetchers/thread-fetchers.js';
import { fetchUserInfos } from '../fetchers/user-fetchers.js';
import type { Viewer } from '../session/viewer.js';
+import { encryptAndUpdateOlmSession } from '../updaters/olm-session-updater.js';
import { getENSNames } from '../utils/ens-cache.js';
@marcinwasowicz
marcinwasowicz / gist:b90db78cb695e658ca3e2b1e1fd85c75
Created May 18, 2023 16:02
Decrypt encrypted field in Android notification
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 ca11afb8e..063be32bd 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
@@ -21,6 +21,7 @@ import app.comm.android.fbjni.CommSecureStore;
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.ThreadOperations;
+import { messageTypes } from 'lib/types/message-types-enum.js';
import { filesystemMediaCache } from '../media/media-cache.js';
-import { commCoreModule } from '../native-modules.js';
+import { commCoreModule, commValidationModule } from '../native-modules.js';
import { setStoreLoadedActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
import { StaffContext } from '../staff/staff-context.js';
@@ -100,6 +100,12 @@ function SQLiteDataHandler(): React.Node {
const handleSensitiveData = React.useCallback(async () => {
@marcinwasowicz
marcinwasowicz / gist:da35ee527660a6a020daf88ddae61d24
Created June 6, 2023 09:52
CommConstants.NATIVE_MESSAGE_TYPES test
diff --git a/native/data/sqlite-data-handler.js b/native/data/sqlite-data-handler.js
index 65177918d..e99144987 100644
--- a/native/data/sqlite-data-handler.js
+++ b/native/data/sqlite-data-handler.js
@@ -12,12 +12,13 @@ import {
logInActionSources,
type LogInActionSource,
} from 'lib/types/account-types.js';
+import { messageTypes } from 'lib/types/message-types-enum.js';
import { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils.js';
#import "NotificationService.h"
#import "Logger.h"
#import "NotificationsCryptoModule.h"
#import "TemporaryMessageStorage.h"
#import <CommExpoPackage/CommExpoPackageObjCCompat.h>
NSString *const backgroundNotificationTypeKey = @"backgroundNotifType";
NSString *const messageInfosKey = @"messageInfos";
NSString *const encryptedPayloadKey = @"encryptedPayload";
NSString *const encryptionFailureKey = @"encryptionFailure";