diff --git a/android/app/build.gradle b/android/app/build.gradle index e4b897dd2..1e3e71b8c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,8 +100,8 @@ android { applicationId "lab.childmindinstitute.data" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1592 - versionName "2.5.0" + versionCode 1596 + versionName "2.5.1" resValue "string", "app_name", "Mindlogger" resValue "string", "build_config_package", "lab.childmindinstitute.data" manifestPlaceholders = [ diff --git a/ios/MindloggerMobile.xcodeproj/project.pbxproj b/ios/MindloggerMobile.xcodeproj/project.pbxproj index 252baf531..356540c37 100644 --- a/ios/MindloggerMobile.xcodeproj/project.pbxproj +++ b/ios/MindloggerMobile.xcodeproj/project.pbxproj @@ -1667,7 +1667,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1679,7 +1679,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -1698,7 +1698,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; INFOPLIST_FILE = MindloggerMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -1706,7 +1706,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -1728,7 +1728,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1739,7 +1739,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1769,7 +1769,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobile/MindloggerMobileRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = MindloggerMobile/Info.plist; @@ -1779,7 +1779,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1979,7 +1979,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1990,7 +1990,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2019,7 +2019,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileDevRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile dev-Info.plist"; @@ -2029,7 +2029,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2058,7 +2058,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2069,7 +2069,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2099,7 +2099,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile qa-Info.plist"; @@ -2109,7 +2109,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2136,7 +2136,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingDebug.entitlements; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2147,7 +2147,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2176,7 +2176,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile staging-Info.plist"; @@ -2186,7 +2186,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2215,7 +2215,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2226,7 +2226,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2256,7 +2256,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile uat-Info.plist"; @@ -2266,7 +2266,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/package.json b/package.json index 8240acc2e..1dd6c5b9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mindlogger-mobile", - "version": "2.5.0", + "version": "2.5.1", "private": true, "scripts": { "android": "yarn android:dev", diff --git a/src/entities/notification/model/factory/NotificationBuilder.ts b/src/entities/notification/model/factory/NotificationBuilder.ts index 730fe4fab..5dc60d68b 100644 --- a/src/entities/notification/model/factory/NotificationBuilder.ts +++ b/src/entities/notification/model/factory/NotificationBuilder.ts @@ -354,10 +354,18 @@ export class NotificationBuilder implements INotificationBuilder { for (const eventEntity of this.eventEntities) { try { + const { assignment } = eventEntity; + + // Normalize target subject ID to null for self-reports + const targetSubjectId = + assignment && assignment.target.id !== assignment.respondent.id + ? assignment.target.id + : null; + const eventNotifications = this.processEvent( eventEntity.event, eventEntity.entity, - eventEntity.assignment?.target.id || null, + targetSubjectId, ); eventNotificationsResult.push(eventNotifications); } catch (error) { diff --git a/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts b/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts index e9d1aac91..449966855 100644 --- a/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts +++ b/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts @@ -166,7 +166,7 @@ export function useOnNotificationTap({ entityType, eventId!, entityName!, - targetSubjectId!, + targetSubjectId ?? null, ); }, executing ? GoBackDuration : WorkaroundDuration,