Skip to content

WPB-23789: Move operation to ConversationSubsystem#5126

Open
blackheaven wants to merge 15 commits intodevelopfrom
gdifolco/WPB-23789-mass-move-conv-sub
Open

WPB-23789: Move operation to ConversationSubsystem#5126
blackheaven wants to merge 15 commits intodevelopfrom
gdifolco/WPB-23789-mass-move-conv-sub

Conversation

@blackheaven
Copy link
Copy Markdown
Contributor

https://wearezeta.atlassian.net/browse/WPB-24072

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven blackheaven marked this pull request as ready for review March 18, 2026 13:41
@blackheaven blackheaven requested review from a team as code owners March 18, 2026 13:41
@blackheaven blackheaven force-pushed the gdifolco/WPB-23789-mass-move-conv-sub branch from 2e747fc to 5cbcf0d Compare March 19, 2026 18:04
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Mar 19, 2026
@blackheaven blackheaven force-pushed the gdifolco/WPB-23789-mass-move-conv-sub branch 8 times, most recently from edd315b to 77e5669 Compare March 24, 2026 14:28
Copy link
Copy Markdown
Contributor

@battermann battermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going to add a changelog?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these do not need to be changed because they are for an older version of the background-worker

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted

Comment on lines +1043 to +1069
settings:
maxTeamSize: 10000
maxFanoutSize: 500
exposeInvitationURLsTeamAllowlist: []
maxConvSize: 500
intraListing: true
conversationCodeURI: null
multiIngress: null
federationProtocols: null
guestLinkTTLSeconds: 31536000
passwordHashingOptions:
algorithm: scrypt # or argon2id
passwordHashingRateLimit:
ipAddrLimit:
burst: 5
inverseRate: 300000000 # 5 mins, makes it 12 reqs/hour
userLimit:
burst: 5
inverseRate: 60000000 # 1 min, makes it 60 req/hour
internalLimit:
burst: 10
inverseRate: 0 # No rate limiting for internal use
ipv4CidrBlock: 32 # Only block individual IP addresses
ipv6CidrBlock: 64 # Block /64 range at a time.
ipAddressExceptions: []
maxRateLimitedKeys: 100000 # Estimated memory usage: 4 MB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is very important that we do not duplicate these here.
We should either move these to a global.settings section and use them both in galley and background-worker templates, or use the values from galley directly in the background-worker configmap.

Comment on lines +117 to +136
maxTeamSize: {{ .settings.maxTeamSize }}
maxFanoutSize: {{ .settings.maxFanoutSize }}
exposeInvitationURLsTeamAllowlist: {{ .settings.exposeInvitationURLsTeamAllowlist }}
maxConvSize: {{ .settings.maxConvSize }}
intraListing: {{ .settings.intraListing }}
{{- if .settings.conversationCodeURI }}
conversationCodeURI: {{ .settings.conversationCodeURI | quote }}
{{- else if .settings.multiIngress }}
multiIngress: {{- toYaml .settings.multiIngress | nindent 8 }}
{{- end }}
{{- if .settings.federationProtocols }}
federationProtocols: {{ .settings.federationProtocols }}
{{- end }}
{{- if .settings.guestLinkTTLSeconds }}
guestLinkTTLSeconds: {{ .settings.guestLinkTTLSeconds }}
{{- end }}
passwordHashingOptions: {{ toYaml .settings.passwordHashingOptions | nindent 8 }}
passwordHashingRateLimit: {{ toYaml .settings.passwordHashingRateLimit | nindent 8 }}
{{- if .settings.checkGroupInfo }}
checkGroupInfo: {{ .settings.checkGroupInfo }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the values from galley here (maybe move them to global.settings?) and not duplicate them in the background-worker section.

-- This file is part of the Wire Server implementation.
--
-- Copyright (C) 2026 Wire Swiss GmbH <opensource@wire.com>
-- Copyright (C) 2022 Wire Swiss GmbH <opensource@wire.com>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change to 2022?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted

Comment on lines +117 to +166
Member (ErrorS 'MLSLegalholdIncompatible) r,
Member (ErrorS 'MLSIdentityMismatch) r,
Member (ErrorS 'MLSUnsupportedMessage) r,
Member (ErrorS 'MLSStaleMessage) r,
Member (ErrorS 'MLSProposalNotFound) r,
Member (ErrorS 'MLSCommitMissingReferences) r,
Member (ErrorS 'MLSSelfRemovalNotAllowed) r,
Member (ErrorS 'MLSClientSenderUserMismatch) r,
Member (ErrorS 'MLSSubConvClientNotInParent) r,
Member (ErrorS 'MLSInvalidLeafNodeSignature) r,
Member (ErrorS 'MLSClientMismatch) r,
Member (ErrorS 'MLSInvalidLeafNodeIndex) r,
Member (ErrorS 'MLSUnsupportedProposal) r,
Member (Error MLSProtocolError) r,
Member (Error GroupInfoDiagnostics) r,
Member (Error MLSOutOfSyncError) r,
Member (Error MLSProposalFailure) r,
Member (Error NonFederatingBackends) r,
Member (ErrorS 'GroupIdVersionNotSupported) r,
Member (ErrorS 'ConvMemberNotFound) r,
Member (ErrorS 'HistoryNotSupported) r,
Member (Error UnreachableBackendsLegacy) r,
Member (ErrorS MLSGroupConversationMismatch) r,
Member (ErrorS ('ActionDenied ConvRole.LeaveConversation)) r,
Member (ErrorS ('ActionDenied ConvRole.RemoveConversationMember)) r,
Member (ErrorS ('ActionDenied ConvRole.DeleteConversation)) r,
Member (ErrorS 'BroadcastLimitExceeded) r,
Member (ErrorS 'MLSFederatedResetNotSupported) r,
Member (ErrorS 'MLSSubConvUnsupportedConvType) r,
Member (ErrorS 'TeamMemberNotFound) r,
Member (ErrorS 'AccessDenied) r,
Member (ErrorS 'MLSMissingGroupInfo) r,
Member (ErrorS 'CodeNotFound) r,
Member (ErrorS 'InvalidConversationPassword) r,
Member (ErrorS 'GuestLinksDisabled) r,
Member (ErrorS 'MLSFederatedOne2OneNotSupported) r,
Member (ErrorS 'TooManyMembers) r,
Member (ErrorS 'CreateConversationCodeConflict) r,
Member (ErrorS 'InvalidTarget) r,
Member (ErrorS 'MLSReadReceiptsNotAllowed) r,
Member (ErrorS 'InvalidTargetAccess) r,
Member (ErrorS 'ConvInvalidProtocolTransition) r,
Member (ErrorS 'MLSMigrationCriteriaNotSatisfied) r,
Member (ErrorS ('ActionDenied ConvRole.AddConversationMember)) r,
Member (ErrorS ('ActionDenied ConvRole.ModifyOtherConversationMember)) r,
Member (ErrorS ('ActionDenied ConvRole.ModifyConversationName)) r,
Member (ErrorS ('ActionDenied ConvRole.ModifyConversationMessageTimer)) r,
Member (ErrorS ('ActionDenied ConvRole.ModifyConversationReceiptMode)) r,
Member (ErrorS ('ActionDenied ConvRole.ModifyConversationAccess)) r,
Member (ErrorS ('ActionDenied ConvRole.ModifyAddPermission)) r,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is insane, can't we merge them into a coproduct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a type

Comment on lines +176 to +178
GetClients ::
UserId ->
ConversationSubsystem m [ClientId]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go somewhere else, IMO, because it is completely unrelated to conversations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved

Comment on lines +189 to +192
GetFeatureInternal ::
(GetFeatureConfig cfg) =>
TeamId ->
ConversationSubsystem m (LockableFeature cfg)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this must go somewhere else. And I am not sure where exactly. Maybe TeamSubsystem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved

Comment on lines +197 to +201
RemoveUser ::
Local StoredConversation ->
MLSRemoval.RemoveUserIncludeMain ->
Qualified UserId ->
ConversationSubsystem m ()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that StoredConversation is exposed by the ConversationSubsystem seems to me like the wrong abstraction.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of them are actually used in other subsystems, but this one can be eliminated (I've moved some more code).

Comment on lines +202 to +765
PostMLSCommitBundle ::
Local x ->
Qualified UserId ->
ClientId ->
ConvType ->
Qualified ConvOrSubConvId ->
Maybe ConnId ->
EnableOutOfSyncCheck ->
IncomingBundle ->
ConversationSubsystem m [LocalConversationUpdate]
PostMLSCommitBundleFromLocalUser ::
Version ->
Local UserId ->
ClientId ->
ConnId ->
RawMLS CommitBundle ->
ConversationSubsystem m MLSMessageSendingStatus
PostMLSMessage ::
Local x ->
Qualified UserId ->
ClientId ->
ConvType ->
Qualified ConvOrSubConvId ->
Maybe ConnId ->
EnableOutOfSyncCheck ->
IncomingMessage ->
ConversationSubsystem m [LocalConversationUpdate]
PostMLSMessageFromLocalUser ::
Version ->
Local UserId ->
ClientId ->
ConnId ->
RawMLS Message ->
ConversationSubsystem m MLSMessageSendingStatus
IsMLSEnabled :: ConversationSubsystem m Bool
IterateConversations ::
Local UserId ->
Range 1 500 Int32 ->
([StoredConversation] -> m a) ->
ConversationSubsystem m ()
RemoveMemberFromLocalConv ::
Local ConvId ->
Local UserId ->
Maybe ConnId ->
Qualified UserId ->
ConversationSubsystem m (Maybe Event)
FederationOnConversationCreated ::
Domain ->
ConversationCreated ConvId ->
ConversationSubsystem m EmptyResponse
FederationGetConversationsV1 ::
Domain ->
GetConversationsRequest ->
ConversationSubsystem m GetConversationsResponse
FederationGetConversations ::
Domain ->
GetConversationsRequest ->
ConversationSubsystem m GetConversationsResponseV2
FederationLeaveConversation ::
Domain ->
LeaveConversationRequest ->
ConversationSubsystem m LeaveConversationResponse
FederationSendMessage ::
Domain ->
ProteusMessageSendRequest ->
ConversationSubsystem m MessageSendResponse
FederationUpdateConversation ::
Domain ->
ConversationUpdateRequest ->
ConversationSubsystem m ConversationUpdateResponse
FederationMlsSendWelcome ::
Domain ->
MLSWelcomeRequest ->
ConversationSubsystem m MLSWelcomeResponse
FederationSendMLSMessage ::
Domain ->
MLSMessageSendRequest ->
ConversationSubsystem m MLSMessageResponse
FederationSendMLSCommitBundle ::
Domain ->
MLSMessageSendRequest ->
ConversationSubsystem m MLSMessageResponse
FederationQueryGroupInfo ::
Domain ->
GetGroupInfoRequest ->
ConversationSubsystem m GetGroupInfoResponse
FederationUpdateTypingIndicator ::
Domain ->
TypingDataUpdateRequest ->
ConversationSubsystem m TypingDataUpdateResponse
FederationOnTypingIndicatorUpdated ::
Domain ->
TypingDataUpdated ->
ConversationSubsystem m EmptyResponse
FederationGetSubConversationForRemoteUser ::
Domain ->
GetSubConversationsRequest ->
ConversationSubsystem m GetSubConversationsResponse
FederationDeleteSubConversationForRemoteUser ::
Domain ->
DeleteSubConversationFedRequest ->
ConversationSubsystem m DeleteSubConversationResponse
FederationLeaveSubConversation ::
Domain ->
LeaveSubConversationRequest ->
ConversationSubsystem m LeaveSubConversationResponse
FederationGetOne2OneConversationV1 ::
Domain ->
GetOne2OneConversationRequest ->
ConversationSubsystem m GetOne2OneConversationResponse
FederationGetOne2OneConversation ::
Domain ->
GetOne2OneConversationRequest ->
ConversationSubsystem m GetOne2OneConversationResponseV2
FederationOnClientRemoved ::
Domain ->
ClientRemovedRequest ->
ConversationSubsystem m EmptyResponse
FederationOnMessageSent ::
Domain ->
RemoteMessage ConvId ->
ConversationSubsystem m EmptyResponse
FederationOnMLSMessageSent ::
Domain ->
RemoteMLSMessage ->
ConversationSubsystem m EmptyResponse
FederationOnConversationUpdatedV0 ::
Domain ->
ConversationUpdateV0 ->
ConversationSubsystem m EmptyResponse
FederationOnConversationUpdated ::
Domain ->
ConversationUpdate ->
ConversationSubsystem m EmptyResponse
FederationOnUserDeleted ::
Domain ->
UserDeletedConversationsNotification ->
ConversationSubsystem m EmptyResponse
PostOtrMessageUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
Maybe IgnoreMissing ->
Maybe ReportMissing ->
NewOtrMessage ->
ConversationSubsystem m (PostOtrResponse ClientMismatch)
PostOtrBroadcastUnqualified ::
Local UserId ->
ConnId ->
Maybe IgnoreMissing ->
Maybe ReportMissing ->
NewOtrMessage ->
ConversationSubsystem m (PostOtrResponse ClientMismatch)
PostProteusMessage ::
Local UserId ->
ConnId ->
Qualified ConvId ->
RawProto QualifiedNewOtrMessage ->
ConversationSubsystem m (PostOtrResponse MessageSendingStatus)
PostProteusBroadcast ::
Local UserId ->
ConnId ->
QualifiedNewOtrMessage ->
ConversationSubsystem m (PostOtrResponse MessageSendingStatus)
DeleteLocalConversation ::
Local UserId ->
ConnId ->
Local ConvId ->
ConversationSubsystem m (UpdateResult Event)
GetMLSPublicKeys ::
Maybe MLSPublicKeyFormat ->
ConversationSubsystem m (MLSKeysByPurpose (MLSKeys SomeKey))
FeatureEnabledForTeam ::
forall cfg m.
(GetFeatureConfig cfg) =>
Proxy cfg ->
TeamId ->
ConversationSubsystem m Bool
GetAllTeamFeaturesForUser ::
UserId ->
ConversationSubsystem m AllTeamFeatures
GetSingleFeatureForUser ::
forall cfg m.
(GetFeatureConfig cfg) =>
UserId ->
ConversationSubsystem m (LockableFeature cfg)
ResetMLSConversation ::
Local UserId ->
MLSReset ->
ConversationSubsystem m ()
GetSubConversation ::
Local UserId ->
Qualified ConvId ->
SubConvId ->
ConversationSubsystem m PublicSubConversation
GetUserStatus ::
Local UserId ->
TeamId ->
UserId ->
ConversationSubsystem m UserLegalHoldStatusResponse
GuardSecondFactorDisabled ::
UserId ->
ConvId ->
ConversationSubsystem m ()
GetBotConversation ::
BotId ->
ConvId ->
ConversationSubsystem m Public.BotConvView
-- Query functions
GetUnqualifiedOwnConversation ::
Local UserId ->
ConvId ->
ConversationSubsystem m Public.OwnConversation
GetOwnConversation ::
Local UserId ->
Qualified ConvId ->
ConversationSubsystem m Public.OwnConversation
GetPaginatedConversations ::
Local UserId ->
Maybe (Range 1 32 (CommaSeparatedList ConvId)) ->
Maybe ConvId ->
Maybe (Range 1 500 Int32) ->
ConversationSubsystem m (Public.ConversationList Public.OwnConversation)
GetConversation ::
Local UserId ->
Qualified ConvId ->
ConversationSubsystem m Public.Conversation
GetConversationRoles ::
Local UserId ->
ConvId ->
ConversationSubsystem m ConversationRolesList
SearchChannels ::
Local UserId ->
TeamId ->
Maybe Text ->
Maybe SortOrder ->
Maybe PageSize ->
Maybe Text ->
Maybe ConvId ->
Bool ->
ConversationSubsystem m ConversationPage
GetGroupInfo ::
Local UserId ->
Qualified ConvId ->
ConversationSubsystem m GroupInfoData
ConversationIdsPageFromUnqualified ::
Local UserId ->
Maybe ConvId ->
Maybe (Range 1 1000 Int32) ->
ConversationSubsystem m (ConversationList ConvId)
ConversationIdsPageFromV2 ::
ListGlobalSelfConvs ->
Local UserId ->
Public.GetPaginatedConversationIds ->
ConversationSubsystem m Public.ConvIdsPage
ConversationIdsPageFrom ::
Local UserId ->
Public.GetPaginatedConversationIds ->
ConversationSubsystem m Public.ConvIdsPage
ListConversations ::
Local UserId ->
Public.ListConversations ->
ConversationSubsystem m ConversationsResponse
GetConversationByReusableCode ::
Local UserId ->
Code.Key ->
Code.Value ->
ConversationSubsystem m ConversationCoverView
GetMLSSelfConversationWithError ::
Local UserId ->
ConversationSubsystem m Public.OwnConversation
GetMLSOne2OneConversationV5 ::
Local UserId ->
Qualified UserId ->
ConversationSubsystem m Public.OwnConversation
GetMLSOne2OneConversationV6 ::
Local UserId ->
Qualified UserId ->
ConversationSubsystem m (MLSOne2OneConversation MLSPublicKey)
GetMLSOne2OneConversation ::
Local UserId ->
Qualified UserId ->
Maybe MLSPublicKeyFormat ->
ConversationSubsystem m (MLSOne2OneConversation SomeKey)
GetLocalSelf ::
Local UserId ->
ConvId ->
ConversationSubsystem m (Maybe Public.Member)
GetSelfMember ::
Local UserId ->
Qualified ConvId ->
ConversationSubsystem m (Maybe Public.Member)
GetConversationGuestLinksStatus ::
UserId ->
ConvId ->
ConversationSubsystem m (LockableFeature GuestLinksConfig)
GetCode ::
Maybe Text ->
Local UserId ->
ConvId ->
ConversationSubsystem m ConversationCodeInfo
-- Update functions
AddMembersUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
Invite ->
ConversationSubsystem m (UpdateResult Event)
AddMembersUnqualifiedV2 ::
Local UserId ->
ConnId ->
ConvId ->
InviteQualified ->
ConversationSubsystem m (UpdateResult Event)
AddMembers ::
Local UserId ->
ConnId ->
Qualified ConvId ->
InviteQualified ->
ConversationSubsystem m (UpdateResult Event)
ReplaceMembers ::
Local UserId ->
ConnId ->
Qualified ConvId ->
InviteQualified ->
ConversationSubsystem m ()
JoinConversationById ::
Local UserId ->
ConnId ->
ConvId ->
ConversationSubsystem m (UpdateResult Event)
JoinConversationByReusableCode ::
Local UserId ->
ConnId ->
JoinConversationByCode ->
ConversationSubsystem m (UpdateResult Event)
CheckReusableCode ::
IpAddr ->
ConversationCode ->
ConversationSubsystem m ()
AddCodeUnqualified ::
Maybe CreateConversationCodeRequest ->
UserId ->
Maybe ZHostValue ->
Maybe ConnId ->
ConvId ->
ConversationSubsystem m AddCodeResult
AddCodeUnqualifiedWithReqBody ::
UserId ->
Maybe Text ->
Maybe ConnId ->
ConvId ->
CreateConversationCodeRequest ->
ConversationSubsystem m AddCodeResult
RmCodeUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
ConversationSubsystem m Event
MemberTypingUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
TypingStatus ->
ConversationSubsystem m ()
MemberTyping ::
Local UserId ->
ConnId ->
Qualified ConvId ->
TypingStatus ->
ConversationSubsystem m ()
RemoveMemberUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
UserId ->
ConversationSubsystem m (Maybe Event)
RemoveMemberQualified ::
Local UserId ->
ConnId ->
Qualified ConvId ->
Qualified UserId ->
ConversationSubsystem m (Maybe Event)
UpdateOtherMemberUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
UserId ->
OtherMemberUpdate ->
ConversationSubsystem m ()
UpdateOtherMember ::
Local UserId ->
ConnId ->
Qualified ConvId ->
Qualified UserId ->
OtherMemberUpdate ->
ConversationSubsystem m ()
UpdateUnqualifiedConversationName ::
Local UserId ->
ConnId ->
ConvId ->
ConversationRename ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationName ::
Local UserId ->
ConnId ->
Qualified ConvId ->
ConversationRename ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationMessageTimerUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
ConversationMessageTimerUpdate ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationMessageTimer ::
Local UserId ->
ConnId ->
Qualified ConvId ->
ConversationMessageTimerUpdate ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationReceiptModeUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
ConversationReceiptModeUpdate ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationReceiptMode ::
Local UserId ->
ConnId ->
Qualified ConvId ->
ConversationReceiptModeUpdate ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationAccessUnqualified ::
Local UserId ->
ConnId ->
ConvId ->
ConversationAccessData ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationAccess ::
Local UserId ->
ConnId ->
Qualified ConvId ->
ConversationAccessData ->
ConversationSubsystem m (UpdateResult Event)
UpdateConversationHistory ::
Local UserId ->
ConnId ->
Qualified ConvId ->
ConversationHistoryUpdate ->
ConversationSubsystem m (UpdateResult Event)
UpdateUnqualifiedSelfMember ::
Local UserId ->
ConnId ->
ConvId ->
MemberUpdate ->
ConversationSubsystem m ()
UpdateSelfMember ::
Local UserId ->
ConnId ->
Qualified ConvId ->
MemberUpdate ->
ConversationSubsystem m ()
UpdateConversationProtocolWithLocalUser ::
Local UserId ->
ConnId ->
Qualified ConvId ->
ProtocolUpdate ->
ConversationSubsystem m (UpdateResult Event)
UpdateChannelAddPermission ::
Local UserId ->
ConnId ->
Qualified ConvId ->
AddPermissionUpdate ->
ConversationSubsystem m (UpdateResult Event)
PostBotMessageUnqualified ::
BotId ->
ConvId ->
Maybe IgnoreMissing ->
Maybe ReportMissing ->
NewOtrMessage ->
ConversationSubsystem m (Either (MessageNotSent ClientMismatch) ClientMismatch)
-- Sub-conversation functions
DeleteSubConversation ::
Local UserId ->
Qualified ConvId ->
SubConvId ->
MLSReset ->
ConversationSubsystem m ()
GetSubConversationGroupInfo ::
Local UserId ->
Qualified ConvId ->
SubConvId ->
ConversationSubsystem m GroupInfoData
LeaveSubConversation ::
Local UserId ->
ClientId ->
Qualified ConvId ->
SubConvId ->
ConversationSubsystem m ()
SendConversationActionNotifications ::
forall tag m.
Sing tag ->
Qualified UserId ->
Bool ->
Maybe ConnId ->
Local StoredConversation ->
Util.BotsAndMembers ->
ConversationAction (tag :: ConversationActionTag) ->
ExtraConversationData ->
ConversationSubsystem m LocalConversationUpdate
PermissionCheck ::
(IsPerm teamAssociation perm) =>
perm -> Maybe teamAssociation -> ConversationSubsystem m teamAssociation
PermissionCheckSAbs ::
PermissionCheckArgs teamAssociation ->
ConversationSubsystem m teamAssociation
EnsureReAuthorised ::
UserId ->
Maybe PlainTextPassword6 ->
Maybe Code.Value ->
Maybe VerificationAction ->
ConversationSubsystem m ()
QualifyLocal ::
a ->
ConversationSubsystem m (Local a)
AssertOnTeam ::
UserId ->
TeamId ->
ConversationSubsystem m ()
CheckConsent ::
Map UserId TeamId ->
UserId ->
ConversationSubsystem m Util.ConsentGiven
GetLHStatusForUsers ::
[UserId] ->
ConversationSubsystem m [(UserId, UserLegalHoldStatus)]
EnsureConnectedToLocals ::
UserId ->
[UserId] ->
ConversationSubsystem m ()
GetTeamMembersForFanout ::
TeamId ->
ConversationSubsystem m TeamMemberList
AssertTeamExists ::
TeamId ->
ConversationSubsystem m ()
InternalUpsertOne2OneConversation ::
UpsertOne2OneConversationRequest ->
ConversationSubsystem m ()
AcceptConv ::
QualifiedWithTag QLocal UserId ->
Maybe ConnId ->
ConvId ->
ConversationSubsystem m OwnConversation
BlockConv ::
QualifiedWithTag QLocal UserId ->
Qualified ConvId ->
ConversationSubsystem m ()
UnblockConv ::
QualifiedWithTag QLocal UserId ->
Maybe ConnId ->
Qualified ConvId ->
ConversationSubsystem m ()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't gone through all of these, but we should for each one if it fits into the ConversationSubsystem or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have moved around some operations

Comment on lines +1049 to +1050
conversationCodeURI: null
multiIngress: null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of these has to be set, otherwise background-worker will crash. This needs a release-note entry. But this problem should go away when background-worker and galley share the same config.

@blackheaven blackheaven force-pushed the gdifolco/WPB-23789-mass-move-conv-sub branch from 7da6fbc to 65d3410 Compare April 1, 2026 15:04
@blackheaven blackheaven requested a review from battermann April 1, 2026 15:04
@blackheaven
Copy link
Copy Markdown
Contributor Author

Are you going to add a changelog?

Yes, as soon as we'ill get to a stable version.

@blackheaven blackheaven force-pushed the gdifolco/WPB-23789-mass-move-conv-sub branch from 65d3410 to 39271bc Compare April 1, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants