diff --git a/lib/handlers/dm-activity-handler.js b/lib/handlers/dm-activity-handler.js --- a/lib/handlers/dm-activity-handler.js +++ b/lib/handlers/dm-activity-handler.js @@ -10,8 +10,8 @@ import { useProcessAndSendDMOperation } from '../shared/dm-ops/process-dm-ops.js'; import { getMostRecentNonLocalMessageID } from '../shared/id-utils.js'; import { threadIsPending } from '../shared/thread-utils.js'; +import { threadSpecs } from '../shared/threads/thread-specs.js'; import type { DMChangeThreadReadStatusOperation } from '../types/dm-ops.js'; -import { threadTypeIsThick } from '../types/thread-types-enum.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector } from '../utils/redux-utils.js'; @@ -107,7 +107,8 @@ !viewerID || !activeThread || !activeThreadInfo || - !threadTypeIsThick(activeThreadInfo.type) || + !threadSpecs[activeThreadInfo.type].protocol + .threadActivityUpdatedByDMActivityHandler || threadIsPending(activeThread) ) { return; diff --git a/lib/shared/threads/protocols/dm-thread-protocol.js b/lib/shared/threads/protocols/dm-thread-protocol.js --- a/lib/shared/threads/protocols/dm-thread-protocol.js +++ b/lib/shared/threads/protocols/dm-thread-protocol.js @@ -579,6 +579,8 @@ messagesStoredOnServer: false, arePendingThreadsDescendantsOfGenesis: false, + + threadActivityUpdatedByDMActivityHandler: true, }); export { dmThreadProtocol }; diff --git a/lib/shared/threads/protocols/keyserver-thread-protocol.js b/lib/shared/threads/protocols/keyserver-thread-protocol.js --- a/lib/shared/threads/protocols/keyserver-thread-protocol.js +++ b/lib/shared/threads/protocols/keyserver-thread-protocol.js @@ -375,6 +375,8 @@ messagesStoredOnServer: true, arePendingThreadsDescendantsOfGenesis: true, + + threadActivityUpdatedByDMActivityHandler: false, }); function mediaIDIsKeyserverID(mediaID: string): boolean { diff --git a/lib/shared/threads/thread-spec.js b/lib/shared/threads/thread-spec.js --- a/lib/shared/threads/thread-spec.js +++ b/lib/shared/threads/thread-spec.js @@ -278,6 +278,9 @@ +shouldPerformSideEffectsBeforeSendingMessage: boolean, +messagesStoredOnServer: boolean, +arePendingThreadsDescendantsOfGenesis: boolean, + // This flag is temporary. It should be deleted as a part of + // https://linear.app/comm/issue/ENG-10729/consider-merging-activity-handlers + +threadActivityUpdatedByDMActivityHandler: boolean, }; export type ThreadSpec = {