Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3180214
D12824.id42624.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12824.id42624.diff
View Options
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,
+};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 4:23 AM (16 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2448594
Default Alt Text
D12824.id42624.diff (1 KB)
Attached To
Mode
D12824: [keyserver][lib] Factor out joinThreadSubscription
Attached
Detach File
Event Timeline
Log In to Comment