From 51b4bdcac5455bab96e138278811822ab8f5631b Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Thu, 11 Dec 2025 16:05:41 +0530 Subject: [PATCH 1/5] handled the websocket event when a user burns a BoR post as receiver --- app/actions/websocket/burn_on_read.ts | 29 +++++++++++ app/actions/websocket/event.ts | 7 ++- app/constants/websocket.ts | 1 + ios/Mattermost.xcodeproj/project.pbxproj | 62 ++++++++++++++++-------- ios/Podfile.lock | 4 +- 5 files changed, 79 insertions(+), 24 deletions(-) diff --git a/app/actions/websocket/burn_on_read.ts b/app/actions/websocket/burn_on_read.ts index ec9f777ebc..5ade31e3d9 100644 --- a/app/actions/websocket/burn_on_read.ts +++ b/app/actions/websocket/burn_on_read.ts @@ -5,6 +5,9 @@ import {handleNewPostEvent, handlePostEdited} from '@actions/websocket/posts'; import DatabaseManager from '@database/manager'; import {getPostById} from '@queries/servers/post'; import {logError} from '@utils/log'; +import {removePost} from "@actions/local/post"; +import {getCurrentUser} from "@queries/servers/user"; +import {PostTypes} from "@constants/post"; export async function handleBoRPostRevealedEvent(serverUrl: string, msg: WebSocketMessage) { try { @@ -34,3 +37,29 @@ export async function handleBoRPostRevealedEvent(serverUrl: string, msg: WebSock return {error}; } } + +export async function handleBoRPostBurnedEvent(serverUrl: string, msg: WebSocketMessage) { + try { + const postId = msg.data.post_id; + const operator = DatabaseManager.serverDatabases[serverUrl]?.operator; + if (!operator) { + return null; + } + + const {database} = operator; + const post = await getPostById(database, postId); + if (!post) { + return null; + } + + if (post.type !== PostTypes.BURN_ON_READ) { + return null; + } + + await removePost(serverUrl, post); + return {}; + } catch (error) { + logError('handleBoRPostBurnedEvent could not handle websocket event for burned burn-on-read post', error); + return {error}; + } +} diff --git a/app/actions/websocket/event.ts b/app/actions/websocket/event.ts index e7cdbaa0cd..a7ec51c948 100644 --- a/app/actions/websocket/event.ts +++ b/app/actions/websocket/event.ts @@ -4,7 +4,7 @@ import {handleAgentPostUpdate} from '@agents/actions/websocket'; import * as bookmark from '@actions/local/channel_bookmark'; -import {handleBoRPostRevealedEvent} from '@actions/websocket/burn_on_read'; +import {handleBoRPostBurnedEvent, handleBoRPostRevealedEvent} from '@actions/websocket/burn_on_read'; import * as scheduledPost from '@actions/websocket/scheduled_post'; import * as calls from '@calls/connection/websocket_event_handlers'; import {WebsocketEvents} from '@constants'; @@ -24,6 +24,8 @@ import {handleThreadUpdatedEvent, handleThreadReadChangedEvent, handleThreadFoll import {handleUserUpdatedEvent, handleUserTypingEvent, handleStatusChangedEvent, handleCustomProfileAttributesValuesUpdatedEvent, handleCustomProfileAttributesFieldUpdatedEvent, handleCustomProfileAttributesFieldDeletedEvent} from './users'; export async function handleWebSocketEvent(serverUrl: string, msg: WebSocketMessage) { + console.log({receivedMessage: msg}); + switch (msg.event) { case WebsocketEvents.POSTED: case WebsocketEvents.EPHEMERAL_MESSAGE: @@ -314,6 +316,9 @@ export async function handleWebSocketEvent(serverUrl: string, msg: WebSocketMess case WebsocketEvents.BOR_POST_REVEALED: handleBoRPostRevealedEvent(serverUrl, msg); break; + case WebsocketEvents.BOR_POST_BURNED: + handleBoRPostBurnedEvent(serverUrl, msg); + break; } handlePlaybookEvents(serverUrl, msg); } diff --git a/app/constants/websocket.ts b/app/constants/websocket.ts index 893f10cdfc..000cca1605 100644 --- a/app/constants/websocket.ts +++ b/app/constants/websocket.ts @@ -111,6 +111,7 @@ const WebsocketEvents = { // Burn on Read BOR_POST_REVEALED: 'post_revealed', + BOR_POST_BURNED: 'post_burned', }; export default WebsocketEvents; diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index 6ef781e95b..29d5adc8b5 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -8,14 +8,13 @@ /* Begin PBXBuildFile section */ 02860A1AC3334896837E96B7 /* OpenSans-SemiBoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0DB14DFDF6E04FA69FE769DC /* OpenSans-SemiBoldItalic.ttf */; }; + 0F6C5E632BC2BB9D647341C0 /* Pods_Mattermost.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5548750B8243B0CAFA69C408 /* Pods_Mattermost.framework */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 1AC06461F0B9867B11829943 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C9C33C1C823BB8E1B3E161 /* ExpoModulesProvider.swift */; }; - 266E7D53748BB8A1308B5CF2 /* libPods-MattermostShare.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B1BD2D4C53C3682D8892612F /* libPods-MattermostShare.a */; }; 27C667A9295241B600E590D5 /* Sentry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C667A8295241B600E590D5 /* Sentry.swift */; }; 27C667AA295241B600E590D5 /* Sentry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C667A8295241B600E590D5 /* Sentry.swift */; }; - 413A0FD06EA0DB2B3F30403F /* libPods-NotificationService.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AEDDC97F55A1F6C056C6B1BC /* libPods-NotificationService.a */; }; 536CC6C323E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 536CC6C123E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.m */; }; 58495E36BF1A4EAB93609E57 /* Metropolis-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 54956DEFEBB74EF78C3A6AE5 /* Metropolis-SemiBold.ttf */; }; 672D988829F1927F004228D6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 672D984629F1927E004228D6 /* InfoPlist.strings */; }; @@ -171,7 +170,8 @@ 83ABFD142C1C90D90029685B /* calls_calm.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 83ABFD102C1C90D90029685B /* calls_calm.mp3 */; }; 83ABFD152C1C90D90029685B /* calls_urgent.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 83ABFD112C1C90D90029685B /* calls_urgent.mp3 */; }; A94508A396424B2DB778AFE9 /* OpenSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E5C16B14E1CE4868886A1A00 /* OpenSans-SemiBold.ttf */; }; - C84AE74C57DDE97D6C3D6924 /* libPods-Mattermost.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A83BBA09DE89A630126EA06 /* libPods-Mattermost.a */; }; + ACE878B03BCFF5F5BA1AF64B /* Pods_MattermostShare.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6847FFA3AD43709487D1107A /* Pods_MattermostShare.framework */; }; + C74D288ACF1D1A086C1DC624 /* Pods_NotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EA1363FD5263A66E7F39ACE /* Pods_NotificationService.framework */; }; C9A107102BBD7C8700753CDC /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C9A1070F2BBD7C8700753CDC /* PrivacyInfo.xcprivacy */; }; C9A107122BBDA00200753CDC /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C9A107112BBDA00200753CDC /* PrivacyInfo.xcprivacy */; }; C9A107142BBDBC8F00753CDC /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C9A107132BBDBC8F00753CDC /* PrivacyInfo.xcprivacy */; }; @@ -229,6 +229,7 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Mattermost/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Mattermost/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Mattermost/main.m; sourceTree = ""; }; + 1EA1363FD5263A66E7F39ACE /* Pods_NotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24C9C33C1C823BB8E1B3E161 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Mattermost/ExpoModulesProvider.swift"; sourceTree = ""; }; 27C667A8295241B600E590D5 /* Sentry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sentry.swift; sourceTree = ""; }; 2E17B88EAD6181B9E9A24084 /* Pods-Mattermost.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mattermost.debug.xcconfig"; path = "Target Support Files/Pods-Mattermost/Pods-Mattermost.debug.xcconfig"; sourceTree = ""; }; @@ -246,6 +247,7 @@ 536CC6C123E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNNotificationEventHandler+HandleReplyAction.m"; sourceTree = ""; }; 536CC6C223E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNNotificationEventHandler+HandleReplyAction.h"; sourceTree = ""; }; 54956DEFEBB74EF78C3A6AE5 /* Metropolis-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Metropolis-SemiBold.ttf"; path = "../assets/fonts/Metropolis-SemiBold.ttf"; sourceTree = ""; }; + 5548750B8243B0CAFA69C408 /* Pods_Mattermost.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Mattermost.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6561AEAC21CC40B8A72ABB93 /* OpenSans-Light.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Light.ttf"; path = "../assets/fonts/OpenSans-Light.ttf"; sourceTree = ""; }; 672D984729F1927E004228D6 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = InfoPlist.strings; sourceTree = ""; }; 672D984A29F1927E004228D6 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = InfoPlist.strings; sourceTree = ""; }; @@ -292,8 +294,8 @@ 67FEAE232A12618000DDF4AE /* zh-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-TW"; path = Localizable.strings; sourceTree = ""; }; 67FEAE272A1261A000DDF4AE /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = Localizable.strings; sourceTree = ""; }; 67FEAE2B2A127C3600DDF4AE /* NumberFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NumberFormatter.swift; sourceTree = ""; }; + 6847FFA3AD43709487D1107A /* Pods_MattermostShare.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MattermostShare.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6BAF8296411D4657B5A0E8F8 /* libRNReactNativeDocViewer.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNReactNativeDocViewer.a; sourceTree = ""; }; - 7A83BBA09DE89A630126EA06 /* libPods-Mattermost.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Mattermost.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7F0F4B0924BA173900E14C60 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = SplashScreenResource/LaunchScreen.storyboard; sourceTree = ""; }; 7F151D3D221B062700FAD8F3 /* RuntimeUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RuntimeUtils.swift; sourceTree = ""; }; 7F151D43221B082A00FAD8F3 /* Mattermost-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Mattermost-Bridging-Header.h"; path = "Mattermost/Mattermost-Bridging-Header.h"; sourceTree = ""; }; @@ -377,8 +379,6 @@ 83ABFD102C1C90D90029685B /* calls_calm.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = calls_calm.mp3; path = ../assets/sounds/calls_calm.mp3; sourceTree = ""; }; 83ABFD112C1C90D90029685B /* calls_urgent.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = calls_urgent.mp3; path = ../assets/sounds/calls_urgent.mp3; sourceTree = ""; }; A10297DBBE728B2BF1BC045E /* Pods-NotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.debug.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.debug.xcconfig"; sourceTree = ""; }; - AEDDC97F55A1F6C056C6B1BC /* libPods-NotificationService.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationService.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B1BD2D4C53C3682D8892612F /* libPods-MattermostShare.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MattermostShare.a"; sourceTree = BUILT_PRODUCTS_DIR; }; BC977883E2624E05975CA65B /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Regular.ttf"; path = "../assets/fonts/OpenSans-Regular.ttf"; sourceTree = ""; }; BE17F630DB5D41FD93F32D22 /* OpenSans-LightItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-LightItalic.ttf"; path = "../assets/fonts/OpenSans-LightItalic.ttf"; sourceTree = ""; }; C7E622B6B1B605983E8E23B7 /* Pods-MattermostShare.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MattermostShare.release.xcconfig"; path = "Target Support Files/Pods-MattermostShare/Pods-MattermostShare.release.xcconfig"; sourceTree = ""; }; @@ -397,7 +397,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C84AE74C57DDE97D6C3D6924 /* libPods-Mattermost.a in Frameworks */, + 0F6C5E632BC2BB9D647341C0 /* Pods_Mattermost.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -405,7 +405,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 413A0FD06EA0DB2B3F30403F /* libPods-NotificationService.a in Frameworks */, + C74D288ACF1D1A086C1DC624 /* Pods_NotificationService.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -413,7 +413,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 266E7D53748BB8A1308B5CF2 /* libPods-MattermostShare.a in Frameworks */, + ACE878B03BCFF5F5BA1AF64B /* Pods_MattermostShare.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -562,9 +562,9 @@ 7FFE32BF1FD9CCAA0038C7A0 /* Sentry.framework */, 7F43D6051F6BF9EB001FC614 /* libPods-Mattermost.a */, 81061F4CBB31484A94D5A8EE /* libz.tbd */, - 7A83BBA09DE89A630126EA06 /* libPods-Mattermost.a */, - AEDDC97F55A1F6C056C6B1BC /* libPods-NotificationService.a */, - B1BD2D4C53C3682D8892612F /* libPods-MattermostShare.a */, + 5548750B8243B0CAFA69C408 /* Pods_Mattermost.framework */, + 6847FFA3AD43709487D1107A /* Pods_MattermostShare.framework */, + 1EA1363FD5263A66E7F39ACE /* Pods_NotificationService.framework */, ); name = Frameworks; sourceTree = ""; @@ -1073,8 +1073,6 @@ 7FC5698F28563FDB000B0905 /* PBXTargetDependency */, ); name = Mattermost; - packageProductDependencies = ( - ); productName = "Hello World"; productReference = 13B07F961A680F5B00A75B9A /* Mattermost.app */; productType = "com.apple.product-type.application"; @@ -1094,8 +1092,6 @@ dependencies = ( ); name = NotificationService; - packageProductDependencies = ( - ); productName = NotificationService; productReference = 7F581D32221ED5C60099E66B /* NotificationService.appex */; productType = "com.apple.product-type.app-extension"; @@ -1115,8 +1111,6 @@ dependencies = ( ); name = MattermostShare; - packageProductDependencies = ( - ); productName = MattermostShare; productReference = 7FC5698628563FDB000B0905 /* MattermostShare.appex */; productType = "com.apple.product-type.app-extension"; @@ -1198,8 +1192,6 @@ uk, ); mainGroup = 83CBB9F61A601CBA00E9B192; - packageReferences = ( - ); productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -2159,6 +2151,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = A10297DBBE728B2BF1BC045E /* Pods-NotificationService.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2208,6 +2202,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = FF7D3AE3E5E892576497A111 /* Pods-NotificationService.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2254,6 +2250,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 4751361789DCCAD0DBD95C16 /* Pods-MattermostShare.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2304,6 +2302,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = C7E622B6B1B605983E8E23B7 /* Pods-MattermostShare.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2392,6 +2392,17 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; @@ -2455,7 +2466,16 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = ( + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 04595b4e89..26ad9426ad 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2640,7 +2640,7 @@ SPEC CHECKSUMS: BlueRSA: 893ae5412de48a508a487067564dbcf9cd49df71 boost: 1dca942403ed9342f98334bf4c3621f011aa7946 CocoaLumberjack: 6a459bc897d6d80bd1b8c78482ec7ad05dffc3f0 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385 EXApplication: 4c72f6017a14a65e338c5e74fca418f35141e819 EXConstants: fcfc75800824ac2d5c592b5bc74130bad17b146b Expo: 75e002fc29a18a72aa3db967b41b29c2b206875d @@ -2657,7 +2657,7 @@ SPEC CHECKSUMS: FBLazyVector: 7605ea4810e0e10ae4815292433c09bf4324ba45 fmt: 01b82d4ca6470831d1cc0852a1af644be019e8f6 Gekidou: 94199ed8d31b900f2caeb9d5739c19bed9defc4a - glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a hermes-engine: 9e868dc7be781364296d6ee2f56d0c1a9ef0bb11 HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 JitsiWebRTC: b47805ab5668be38e7ee60e2258f49badfe8e1d0 From 7dec475c404cfe7c06150e92dca0a607df8c1a95 Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Thu, 11 Dec 2025 16:06:56 +0530 Subject: [PATCH 2/5] test: add comprehensive tests for handleBoRPostBurnedEvent function --- app/actions/websocket/burn_on_read.test.ts | 83 +++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/app/actions/websocket/burn_on_read.test.ts b/app/actions/websocket/burn_on_read.test.ts index a07c1b5b92..c1998ebbbf 100644 --- a/app/actions/websocket/burn_on_read.test.ts +++ b/app/actions/websocket/burn_on_read.test.ts @@ -5,11 +5,14 @@ import {handleNewPostEvent, handlePostEdited} from '@actions/websocket/posts'; import DatabaseManager from '@database/manager'; import {getPostById} from '@queries/servers/post'; import TestHelper from '@test/test_helper'; +import {removePost} from '@actions/local/post'; +import {PostTypes} from '@constants/post'; -import {handleBoRPostRevealedEvent} from './burn_on_read'; +import {handleBoRPostRevealedEvent, handleBoRPostBurnedEvent} from './burn_on_read'; jest.mock('@actions/websocket/posts'); jest.mock('@queries/servers/post'); +jest.mock('@actions/local/post'); const serverUrl = 'burnOnRead.test.com'; @@ -19,6 +22,7 @@ describe('WebSocket Burn on Read Actions', () => { const mockedGetPostById = jest.mocked(getPostById); const mockedHandleNewPostEvent = jest.mocked(handleNewPostEvent); const mockedHandlePostEdited = jest.mocked(handlePostEdited); + const mockedRemovePost = jest.mocked(removePost); beforeEach(async () => { await DatabaseManager.init([serverUrl]); @@ -105,4 +109,81 @@ describe('WebSocket Burn on Read Actions', () => { expect(mockedHandlePostEdited).not.toHaveBeenCalled(); }); }); + + describe('handleBoRPostBurnedEvent', () => { + const burnOnReadPost = TestHelper.fakePostModel({ + id: 'post1', + type: PostTypes.BURN_ON_READ, + }); + + const regularPost = TestHelper.fakePostModel({ + id: 'post2', + type: '', + }); + + const msg = { + data: { + post_id: 'post1', + }, + } as WebSocketMessage; + + it('should remove burn-on-read post when it exists locally', async () => { + mockedGetPostById.mockResolvedValue(burnOnReadPost); + + const result = await handleBoRPostBurnedEvent(serverUrl, msg); + + expect(mockedGetPostById).toHaveBeenCalledWith(expect.any(Object), 'post1'); + expect(mockedRemovePost).toHaveBeenCalledWith(serverUrl, burnOnReadPost); + expect(result).toEqual({}); + }); + + it('should not remove post when post does not exist locally', async () => { + mockedGetPostById.mockResolvedValue(undefined); + + const result = await handleBoRPostBurnedEvent(serverUrl, msg); + + expect(mockedGetPostById).toHaveBeenCalledWith(expect.any(Object), 'post1'); + expect(mockedRemovePost).not.toHaveBeenCalled(); + expect(result).toBeNull(); + }); + + it('should not remove post when post is not burn-on-read type', async () => { + mockedGetPostById.mockResolvedValue(regularPost); + + const result = await handleBoRPostBurnedEvent(serverUrl, msg); + + expect(mockedGetPostById).toHaveBeenCalledWith(expect.any(Object), 'post1'); + expect(mockedRemovePost).not.toHaveBeenCalled(); + expect(result).toBeNull(); + }); + + it('should handle missing server database gracefully', async () => { + const result = await handleBoRPostBurnedEvent('invalid-server-url', msg); + + expect(mockedGetPostById).not.toHaveBeenCalled(); + expect(mockedRemovePost).not.toHaveBeenCalled(); + expect(result).toBeNull(); + }); + + it('should handle missing operator gracefully', async () => { + // Mock a server database without an operator + DatabaseManager.serverDatabases[serverUrl] = {} as any; + + const result = await handleBoRPostBurnedEvent(serverUrl, msg); + + expect(mockedGetPostById).not.toHaveBeenCalled(); + expect(mockedRemovePost).not.toHaveBeenCalled(); + expect(result).toBeNull(); + }); + + it('should handle errors gracefully and return error object', async () => { + mockedGetPostById.mockRejectedValue(new Error('Database error')); + + const result = await handleBoRPostBurnedEvent(serverUrl, msg); + + expect(result).toHaveProperty('error'); + expect(result.error).toBeInstanceOf(Error); + expect(mockedRemovePost).not.toHaveBeenCalled(); + }); + }); }); From 71de558820d0a33ca34d6d585759339fbfc66d4e Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Thu, 11 Dec 2025 16:09:59 +0530 Subject: [PATCH 3/5] Added tests --- app/actions/websocket/burn_on_read.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/actions/websocket/burn_on_read.test.ts b/app/actions/websocket/burn_on_read.test.ts index c1998ebbbf..f203fbe0f3 100644 --- a/app/actions/websocket/burn_on_read.test.ts +++ b/app/actions/websocket/burn_on_read.test.ts @@ -1,12 +1,12 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. +import {removePost} from '@actions/local/post'; import {handleNewPostEvent, handlePostEdited} from '@actions/websocket/posts'; +import {PostTypes} from '@constants/post'; import DatabaseManager from '@database/manager'; import {getPostById} from '@queries/servers/post'; import TestHelper from '@test/test_helper'; -import {removePost} from '@actions/local/post'; -import {PostTypes} from '@constants/post'; import {handleBoRPostRevealedEvent, handleBoRPostBurnedEvent} from './burn_on_read'; @@ -182,7 +182,7 @@ describe('WebSocket Burn on Read Actions', () => { const result = await handleBoRPostBurnedEvent(serverUrl, msg); expect(result).toHaveProperty('error'); - expect(result.error).toBeInstanceOf(Error); + expect(result!.error).toBeInstanceOf(Error); expect(mockedRemovePost).not.toHaveBeenCalled(); }); }); From f69d2039f4c8867f363726c6955cdf0abfb761f4 Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Thu, 11 Dec 2025 16:12:37 +0530 Subject: [PATCH 4/5] reset unintended changes --- app/actions/websocket/burn_on_read.ts | 5 +- app/actions/websocket/event.ts | 2 - ios/Mattermost.xcodeproj/project.pbxproj | 62 ++++++++---------------- ios/Podfile.lock | 4 +- 4 files changed, 25 insertions(+), 48 deletions(-) diff --git a/app/actions/websocket/burn_on_read.ts b/app/actions/websocket/burn_on_read.ts index 5ade31e3d9..b519ecc04d 100644 --- a/app/actions/websocket/burn_on_read.ts +++ b/app/actions/websocket/burn_on_read.ts @@ -1,13 +1,12 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. +import {removePost} from '@actions/local/post'; import {handleNewPostEvent, handlePostEdited} from '@actions/websocket/posts'; +import {PostTypes} from '@constants/post'; import DatabaseManager from '@database/manager'; import {getPostById} from '@queries/servers/post'; import {logError} from '@utils/log'; -import {removePost} from "@actions/local/post"; -import {getCurrentUser} from "@queries/servers/user"; -import {PostTypes} from "@constants/post"; export async function handleBoRPostRevealedEvent(serverUrl: string, msg: WebSocketMessage) { try { diff --git a/app/actions/websocket/event.ts b/app/actions/websocket/event.ts index a7ec51c948..ba731545fe 100644 --- a/app/actions/websocket/event.ts +++ b/app/actions/websocket/event.ts @@ -24,8 +24,6 @@ import {handleThreadUpdatedEvent, handleThreadReadChangedEvent, handleThreadFoll import {handleUserUpdatedEvent, handleUserTypingEvent, handleStatusChangedEvent, handleCustomProfileAttributesValuesUpdatedEvent, handleCustomProfileAttributesFieldUpdatedEvent, handleCustomProfileAttributesFieldDeletedEvent} from './users'; export async function handleWebSocketEvent(serverUrl: string, msg: WebSocketMessage) { - console.log({receivedMessage: msg}); - switch (msg.event) { case WebsocketEvents.POSTED: case WebsocketEvents.EPHEMERAL_MESSAGE: diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index 29d5adc8b5..6ef781e95b 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -8,13 +8,14 @@ /* Begin PBXBuildFile section */ 02860A1AC3334896837E96B7 /* OpenSans-SemiBoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0DB14DFDF6E04FA69FE769DC /* OpenSans-SemiBoldItalic.ttf */; }; - 0F6C5E632BC2BB9D647341C0 /* Pods_Mattermost.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5548750B8243B0CAFA69C408 /* Pods_Mattermost.framework */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 1AC06461F0B9867B11829943 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C9C33C1C823BB8E1B3E161 /* ExpoModulesProvider.swift */; }; + 266E7D53748BB8A1308B5CF2 /* libPods-MattermostShare.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B1BD2D4C53C3682D8892612F /* libPods-MattermostShare.a */; }; 27C667A9295241B600E590D5 /* Sentry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C667A8295241B600E590D5 /* Sentry.swift */; }; 27C667AA295241B600E590D5 /* Sentry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C667A8295241B600E590D5 /* Sentry.swift */; }; + 413A0FD06EA0DB2B3F30403F /* libPods-NotificationService.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AEDDC97F55A1F6C056C6B1BC /* libPods-NotificationService.a */; }; 536CC6C323E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 536CC6C123E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.m */; }; 58495E36BF1A4EAB93609E57 /* Metropolis-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 54956DEFEBB74EF78C3A6AE5 /* Metropolis-SemiBold.ttf */; }; 672D988829F1927F004228D6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 672D984629F1927E004228D6 /* InfoPlist.strings */; }; @@ -170,8 +171,7 @@ 83ABFD142C1C90D90029685B /* calls_calm.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 83ABFD102C1C90D90029685B /* calls_calm.mp3 */; }; 83ABFD152C1C90D90029685B /* calls_urgent.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 83ABFD112C1C90D90029685B /* calls_urgent.mp3 */; }; A94508A396424B2DB778AFE9 /* OpenSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E5C16B14E1CE4868886A1A00 /* OpenSans-SemiBold.ttf */; }; - ACE878B03BCFF5F5BA1AF64B /* Pods_MattermostShare.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6847FFA3AD43709487D1107A /* Pods_MattermostShare.framework */; }; - C74D288ACF1D1A086C1DC624 /* Pods_NotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EA1363FD5263A66E7F39ACE /* Pods_NotificationService.framework */; }; + C84AE74C57DDE97D6C3D6924 /* libPods-Mattermost.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A83BBA09DE89A630126EA06 /* libPods-Mattermost.a */; }; C9A107102BBD7C8700753CDC /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C9A1070F2BBD7C8700753CDC /* PrivacyInfo.xcprivacy */; }; C9A107122BBDA00200753CDC /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C9A107112BBDA00200753CDC /* PrivacyInfo.xcprivacy */; }; C9A107142BBDBC8F00753CDC /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C9A107132BBDBC8F00753CDC /* PrivacyInfo.xcprivacy */; }; @@ -229,7 +229,6 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Mattermost/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Mattermost/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Mattermost/main.m; sourceTree = ""; }; - 1EA1363FD5263A66E7F39ACE /* Pods_NotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24C9C33C1C823BB8E1B3E161 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Mattermost/ExpoModulesProvider.swift"; sourceTree = ""; }; 27C667A8295241B600E590D5 /* Sentry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sentry.swift; sourceTree = ""; }; 2E17B88EAD6181B9E9A24084 /* Pods-Mattermost.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mattermost.debug.xcconfig"; path = "Target Support Files/Pods-Mattermost/Pods-Mattermost.debug.xcconfig"; sourceTree = ""; }; @@ -247,7 +246,6 @@ 536CC6C123E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RNNotificationEventHandler+HandleReplyAction.m"; sourceTree = ""; }; 536CC6C223E79287002C478C /* RNNotificationEventHandler+HandleReplyAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNNotificationEventHandler+HandleReplyAction.h"; sourceTree = ""; }; 54956DEFEBB74EF78C3A6AE5 /* Metropolis-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Metropolis-SemiBold.ttf"; path = "../assets/fonts/Metropolis-SemiBold.ttf"; sourceTree = ""; }; - 5548750B8243B0CAFA69C408 /* Pods_Mattermost.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Mattermost.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6561AEAC21CC40B8A72ABB93 /* OpenSans-Light.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Light.ttf"; path = "../assets/fonts/OpenSans-Light.ttf"; sourceTree = ""; }; 672D984729F1927E004228D6 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = InfoPlist.strings; sourceTree = ""; }; 672D984A29F1927E004228D6 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = InfoPlist.strings; sourceTree = ""; }; @@ -294,8 +292,8 @@ 67FEAE232A12618000DDF4AE /* zh-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-TW"; path = Localizable.strings; sourceTree = ""; }; 67FEAE272A1261A000DDF4AE /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = Localizable.strings; sourceTree = ""; }; 67FEAE2B2A127C3600DDF4AE /* NumberFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NumberFormatter.swift; sourceTree = ""; }; - 6847FFA3AD43709487D1107A /* Pods_MattermostShare.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MattermostShare.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6BAF8296411D4657B5A0E8F8 /* libRNReactNativeDocViewer.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNReactNativeDocViewer.a; sourceTree = ""; }; + 7A83BBA09DE89A630126EA06 /* libPods-Mattermost.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Mattermost.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7F0F4B0924BA173900E14C60 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = SplashScreenResource/LaunchScreen.storyboard; sourceTree = ""; }; 7F151D3D221B062700FAD8F3 /* RuntimeUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RuntimeUtils.swift; sourceTree = ""; }; 7F151D43221B082A00FAD8F3 /* Mattermost-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Mattermost-Bridging-Header.h"; path = "Mattermost/Mattermost-Bridging-Header.h"; sourceTree = ""; }; @@ -379,6 +377,8 @@ 83ABFD102C1C90D90029685B /* calls_calm.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = calls_calm.mp3; path = ../assets/sounds/calls_calm.mp3; sourceTree = ""; }; 83ABFD112C1C90D90029685B /* calls_urgent.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = calls_urgent.mp3; path = ../assets/sounds/calls_urgent.mp3; sourceTree = ""; }; A10297DBBE728B2BF1BC045E /* Pods-NotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.debug.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.debug.xcconfig"; sourceTree = ""; }; + AEDDC97F55A1F6C056C6B1BC /* libPods-NotificationService.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationService.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + B1BD2D4C53C3682D8892612F /* libPods-MattermostShare.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MattermostShare.a"; sourceTree = BUILT_PRODUCTS_DIR; }; BC977883E2624E05975CA65B /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Regular.ttf"; path = "../assets/fonts/OpenSans-Regular.ttf"; sourceTree = ""; }; BE17F630DB5D41FD93F32D22 /* OpenSans-LightItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-LightItalic.ttf"; path = "../assets/fonts/OpenSans-LightItalic.ttf"; sourceTree = ""; }; C7E622B6B1B605983E8E23B7 /* Pods-MattermostShare.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MattermostShare.release.xcconfig"; path = "Target Support Files/Pods-MattermostShare/Pods-MattermostShare.release.xcconfig"; sourceTree = ""; }; @@ -397,7 +397,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0F6C5E632BC2BB9D647341C0 /* Pods_Mattermost.framework in Frameworks */, + C84AE74C57DDE97D6C3D6924 /* libPods-Mattermost.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -405,7 +405,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C74D288ACF1D1A086C1DC624 /* Pods_NotificationService.framework in Frameworks */, + 413A0FD06EA0DB2B3F30403F /* libPods-NotificationService.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -413,7 +413,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ACE878B03BCFF5F5BA1AF64B /* Pods_MattermostShare.framework in Frameworks */, + 266E7D53748BB8A1308B5CF2 /* libPods-MattermostShare.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -562,9 +562,9 @@ 7FFE32BF1FD9CCAA0038C7A0 /* Sentry.framework */, 7F43D6051F6BF9EB001FC614 /* libPods-Mattermost.a */, 81061F4CBB31484A94D5A8EE /* libz.tbd */, - 5548750B8243B0CAFA69C408 /* Pods_Mattermost.framework */, - 6847FFA3AD43709487D1107A /* Pods_MattermostShare.framework */, - 1EA1363FD5263A66E7F39ACE /* Pods_NotificationService.framework */, + 7A83BBA09DE89A630126EA06 /* libPods-Mattermost.a */, + AEDDC97F55A1F6C056C6B1BC /* libPods-NotificationService.a */, + B1BD2D4C53C3682D8892612F /* libPods-MattermostShare.a */, ); name = Frameworks; sourceTree = ""; @@ -1073,6 +1073,8 @@ 7FC5698F28563FDB000B0905 /* PBXTargetDependency */, ); name = Mattermost; + packageProductDependencies = ( + ); productName = "Hello World"; productReference = 13B07F961A680F5B00A75B9A /* Mattermost.app */; productType = "com.apple.product-type.application"; @@ -1092,6 +1094,8 @@ dependencies = ( ); name = NotificationService; + packageProductDependencies = ( + ); productName = NotificationService; productReference = 7F581D32221ED5C60099E66B /* NotificationService.appex */; productType = "com.apple.product-type.app-extension"; @@ -1111,6 +1115,8 @@ dependencies = ( ); name = MattermostShare; + packageProductDependencies = ( + ); productName = MattermostShare; productReference = 7FC5698628563FDB000B0905 /* MattermostShare.appex */; productType = "com.apple.product-type.app-extension"; @@ -1192,6 +1198,8 @@ uk, ); mainGroup = 83CBB9F61A601CBA00E9B192; + packageReferences = ( + ); productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -2151,8 +2159,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = A10297DBBE728B2BF1BC045E /* Pods-NotificationService.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2202,8 +2208,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = FF7D3AE3E5E892576497A111 /* Pods-NotificationService.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2250,8 +2254,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 4751361789DCCAD0DBD95C16 /* Pods-MattermostShare.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2302,8 +2304,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = C7E622B6B1B605983E8E23B7 /* Pods-MattermostShare.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "$(inherited)"; @@ -2392,17 +2392,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", - "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", - ); IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; @@ -2466,16 +2455,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", - "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", - ); + HEADER_SEARCH_PATHS = ""; IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 26ad9426ad..04595b4e89 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2640,7 +2640,7 @@ SPEC CHECKSUMS: BlueRSA: 893ae5412de48a508a487067564dbcf9cd49df71 boost: 1dca942403ed9342f98334bf4c3621f011aa7946 CocoaLumberjack: 6a459bc897d6d80bd1b8c78482ec7ad05dffc3f0 - DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385 + DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 EXApplication: 4c72f6017a14a65e338c5e74fca418f35141e819 EXConstants: fcfc75800824ac2d5c592b5bc74130bad17b146b Expo: 75e002fc29a18a72aa3db967b41b29c2b206875d @@ -2657,7 +2657,7 @@ SPEC CHECKSUMS: FBLazyVector: 7605ea4810e0e10ae4815292433c09bf4324ba45 fmt: 01b82d4ca6470831d1cc0852a1af644be019e8f6 Gekidou: 94199ed8d31b900f2caeb9d5739c19bed9defc4a - glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a + glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 9e868dc7be781364296d6ee2f56d0c1a9ef0bb11 HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 JitsiWebRTC: b47805ab5668be38e7ee60e2258f49badfe8e1d0 From 7fb2a7f461993c17fb5566714e5e91ff85a4aaec Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Fri, 12 Dec 2025 08:37:16 +0530 Subject: [PATCH 5/5] Minor fix --- app/actions/websocket/burn_on_read.test.ts | 2 +- app/actions/websocket/burn_on_read.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/actions/websocket/burn_on_read.test.ts b/app/actions/websocket/burn_on_read.test.ts index f203fbe0f3..3953f7c260 100644 --- a/app/actions/websocket/burn_on_read.test.ts +++ b/app/actions/websocket/burn_on_read.test.ts @@ -103,7 +103,7 @@ describe('WebSocket Burn on Read Actions', () => { const result = await handleBoRPostRevealedEvent(serverUrl, invalidJsonMsg); - expect(result).toBeNull(); + expect(result).toEqual({}); expect(mockedGetPostById).not.toHaveBeenCalled(); expect(mockedHandleNewPostEvent).not.toHaveBeenCalled(); expect(mockedHandlePostEdited).not.toHaveBeenCalled(); diff --git a/app/actions/websocket/burn_on_read.ts b/app/actions/websocket/burn_on_read.ts index b519ecc04d..59d4eb8195 100644 --- a/app/actions/websocket/burn_on_read.ts +++ b/app/actions/websocket/burn_on_read.ts @@ -12,7 +12,7 @@ export async function handleBoRPostRevealedEvent(serverUrl: string, msg: WebSock try { const operator = DatabaseManager.serverDatabases[serverUrl]?.operator; if (!operator) { - return null; + return {}; } const {database} = operator; @@ -20,7 +20,7 @@ export async function handleBoRPostRevealedEvent(serverUrl: string, msg: WebSock try { post = JSON.parse(msg.data.post); } catch { - return null; + return {}; } const existingPost = await getPostById(database, post.id);