diff --git a/keyserver/src/updaters/thread-permission-updaters.js b/keyserver/src/updaters/thread-permission-updaters.js --- a/keyserver/src/updaters/thread-permission-updaters.js +++ b/keyserver/src/updaters/thread-permission-updaters.js @@ -13,7 +13,11 @@ } from 'lib/permissions/thread-permissions.js'; import type { CalendarQuery } from 'lib/types/entry-types.js'; import { messageTypes } from 'lib/types/message-types-enum.js'; -import type { ThreadSubscription } from 'lib/types/subscription-types.js'; +import { + type ThreadSubscription, + defaultThreadSubscription, + joinThreadSubscription, +} from 'lib/types/subscription-types.js'; import type { ThreadPermissionsBlob, ThreadRolePermissionsBlob, @@ -912,11 +916,8 @@ return { membershipRows, relationshipChangeset }; } -const defaultSubscriptionString = JSON.stringify({ - home: false, - pushNotifs: false, -}); -const joinSubscriptionString = JSON.stringify({ home: true, pushNotifs: true }); +const defaultSubscriptionString = JSON.stringify(defaultThreadSubscription); +const joinSubscriptionString = JSON.stringify(joinThreadSubscription); const membershipInsertBatchSize = 50; diff --git a/lib/types/subscription-types.js b/lib/types/subscription-types.js --- a/lib/types/subscription-types.js +++ b/lib/types/subscription-types.js @@ -37,4 +37,13 @@ pushNotifs: false, }; -export { defaultThreadSubscription, threadSubscriptions }; +const joinThreadSubscription: ThreadSubscription = { + home: true, + pushNotifs: true, +}; + +export { + threadSubscriptions, + defaultThreadSubscription, + joinThreadSubscription, +};