Page MenuHomePhabricator

D5107.diff
No OneTemporary

D5107.diff

diff --git a/docs/dev_environment.md b/docs/dev_environment.md
--- a/docs/dev_environment.md
+++ b/docs/dev_environment.md
@@ -773,7 +773,7 @@
- If you’re deploying a release build, the above strategy won’t work. Your best bet to override the server URL is to get to the secret “Developer tools” menu option in the app.
1. You may need to use a real production account for this, since the server address will default to the production server if this is the first build you’ve deployed to the target device.
- 2. Next, in order for the “Developer tools” menu option to appear, you’ll need to add your user ID to [the list of user IDs in `staff.json`](https://github.com/CommE2E/comm/blob/master/lib/facts/staff.json). A good way to figure out your user ID is to use the Chrome Redux debugger to inspect the `currentUserInfo` property when logged into the web app.
+ 2. Next, in order for the “Developer tools” menu option to appear, you’ll need to add your user ID to [the list of user IDs in `staff.js`](https://github.com/CommE2E/comm/blob/master/lib/facts/staff.js). A good way to figure out your user ID is to use the Chrome Redux debugger to inspect the `currentUserInfo` property when logged into the web app.
3. Finally, you should be able to navigate to Profile → Developer tools in the app and set the address of the local server. It should look something like this:
```
diff --git a/keyserver/src/scripts/add-edit-thread-detailed-permissions.js b/keyserver/src/scripts/add-edit-thread-detailed-permissions.js
--- a/keyserver/src/scripts/add-edit-thread-detailed-permissions.js
+++ b/keyserver/src/scripts/add-edit-thread-detailed-permissions.js
@@ -1,5 +1,6 @@
// @flow
-import bots from 'lib/facts/bots.json';
+
+import bots from 'lib/facts/bots';
import { assertThreadType } from 'lib/types/thread-types';
import { dbQuery, SQL } from '../database/database';
diff --git a/keyserver/src/scripts/fix-new-thread-types.js b/keyserver/src/scripts/fix-new-thread-types.js
--- a/keyserver/src/scripts/fix-new-thread-types.js
+++ b/keyserver/src/scripts/fix-new-thread-types.js
@@ -1,6 +1,6 @@
// @flow
-import bots from 'lib/facts/bots.json';
+import bots from 'lib/facts/bots';
import { threadTypes, assertThreadType } from 'lib/types/thread-types';
import { dbQuery, SQL } from '../database/database';
diff --git a/keyserver/src/scripts/sidebar-know-of-migration.js b/keyserver/src/scripts/sidebar-know-of-migration.js
--- a/keyserver/src/scripts/sidebar-know-of-migration.js
+++ b/keyserver/src/scripts/sidebar-know-of-migration.js
@@ -1,6 +1,6 @@
// @flow
-import bots from 'lib/facts/bots.json';
+import bots from 'lib/facts/bots';
import { threadTypes, type ThreadType } from 'lib/types/thread-types';
import { dbQuery, SQL } from '../database/database';
diff --git a/lib/facts/ashoat.js b/lib/facts/ashoat.js
new file mode 100644
--- /dev/null
+++ b/lib/facts/ashoat.js
@@ -0,0 +1,15 @@
+// @flow
+
+type Ashoat = {
+ +id: string,
+ +email: string,
+ +landing_email: string,
+};
+
+const ashoat: Ashoat = {
+ id: '256',
+ email: 'ashoat@gmail.com',
+ landing_email: 'postmaster@comm.app',
+};
+
+export default ashoat;
diff --git a/lib/facts/ashoat.json b/lib/facts/ashoat.json
deleted file mode 100644
--- a/lib/facts/ashoat.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "256",
- "email": "ashoat@gmail.com",
- "landing_email": "postmaster@comm.app"
-}
diff --git a/lib/facts/bots.js b/lib/facts/bots.js
new file mode 100644
--- /dev/null
+++ b/lib/facts/bots.js
@@ -0,0 +1,17 @@
+// @flow
+
+type Bots = {
+ +commbot: {
+ +userID: string,
+ +staffThreadID: string,
+ },
+};
+
+const bots: Bots = {
+ commbot: {
+ userID: '5',
+ staffThreadID: '83794',
+ },
+};
+
+export default bots;
diff --git a/lib/facts/bots.json b/lib/facts/bots.json
deleted file mode 100644
--- a/lib/facts/bots.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "commbot": {
- "userID": "5",
- "staffThreadID": "83794"
- }
-}
diff --git a/lib/facts/genesis.js b/lib/facts/genesis.js
new file mode 100644
--- /dev/null
+++ b/lib/facts/genesis.js
@@ -0,0 +1,23 @@
+// @flow
+
+type Genesis = {
+ +id: string,
+ +name: string,
+ +description: string,
+ +introMessages: $ReadOnlyArray<string>,
+};
+
+const genesis: Genesis = {
+ id: '1',
+ name: 'GENESIS',
+ description:
+ 'This is the first community on Comm. In the future it will be possible to create chats outside of a community, but for now all of these chats get set with GENESIS as their parent. GENESIS is hosted on Ashoat’s keyserver.',
+ introMessages: [
+ 'welcome to Genesis!',
+ 'for now, Genesis is the only community on Comm, and is the parent of all new chats',
+ 'this is meant to be temporary. we’re working on support for chats that can exist outside of any community, as well as support for user-hosted communities',
+ 'to learn more about our roadmap and how Genesis fits in, check out [this document](https://www.notion.so/Comm-Genesis-1059f131fb354250abd1966894b15951)',
+ ],
+};
+
+export default genesis;
diff --git a/lib/facts/genesis.json b/lib/facts/genesis.json
deleted file mode 100644
--- a/lib/facts/genesis.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "1",
- "name": "GENESIS",
- "description": "This is the first community on Comm. In the future it will be possible to create chats outside of a community, but for now all of these chats get set with GENESIS as their parent. GENESIS is hosted on Ashoat’s keyserver.",
- "introMessages": [
- "welcome to Genesis!",
- "for now, Genesis is the only community on Comm, and is the parent of all new chats",
- "this is meant to be temporary. we’re working on support for chats that can exist outside of any community, as well as support for user-hosted communities",
- "to learn more about our roadmap and how Genesis fits in, check out [this document](https://www.notion.so/Comm-Genesis-1059f131fb354250abd1966894b15951)"
- ]
-}
diff --git a/lib/facts/staff.js b/lib/facts/staff.js
new file mode 100644
--- /dev/null
+++ b/lib/facts/staff.js
@@ -0,0 +1,26 @@
+// @flow
+
+const staff: $ReadOnlyArray<string> = [
+ '256',
+ '518252',
+ '379341',
+ '1157418',
+ '1509097',
+ '1329299',
+ '1105724',
+ '1559042',
+ '1589929',
+ '1629414',
+ '1362191',
+ '1521260',
+ '2039907',
+ '2241388',
+ '2231519',
+ '2385131',
+ '2775177',
+ '2815499',
+ '3033752',
+ '3079802',
+];
+
+export default staff;
diff --git a/lib/facts/staff.json b/lib/facts/staff.json
deleted file mode 100644
--- a/lib/facts/staff.json
+++ /dev/null
@@ -1,22 +0,0 @@
-[
- "256",
- "518252",
- "379341",
- "1157418",
- "1509097",
- "1329299",
- "1105724",
- "1559042",
- "1589929",
- "1629414",
- "1362191",
- "1521260",
- "2039907",
- "2241388",
- "2231519",
- "2385131",
- "2775177",
- "2815499",
- "3033752",
- "3079802"
-]
diff --git a/lib/facts/testers.js b/lib/facts/testers.js
new file mode 100644
--- /dev/null
+++ b/lib/facts/testers.js
@@ -0,0 +1,26 @@
+// @flow
+
+type Testers = {
+ +name: string,
+ +description: string,
+ +introMessages: $ReadOnlyArray<string>,
+};
+
+const testers: Testers = {
+ name: 'OG SquadCal testers',
+ description:
+ 'this thread contains all of the OG testers that helped tested SquadCal over the years!! THANK YOU :)',
+ introMessages: [
+ 'hello my dear SquadCal testers 💗',
+ 'first of all, thank you SO MUCH for helping to test this app over the last couple years. it means the world to me',
+ 'we have some big changes coming up:\n1. the app is getting renamed to Comm! we hope to submit Comm to the App Store in the next couple weeks\n' +
+ '2. we’re working on updating the app to use E2E encryption so that we don’t have access to your messages\n' +
+ '3. after that, we’re aiming to launch a self-hosted communities feature, where you can use your laptop as a server to host a chat community. sort of like Discord, except totally private',
+ 'as part of moving to E2E encryption, we had to figure out what to do with your existing messages, which are currently stored on my private server',
+ 'we don’t want to delete your messages, but we also want to be transparent about the fact that I have access to them',
+ 'the solution we came up with was to move them all into the very first self-hosted community on Comm: Genesis',
+ 'check out [this link](https://www.notion.so/Comm-Genesis-1059f131fb354250abd1966894b15951) if you want to read more :)',
+ ],
+};
+
+export default testers;
diff --git a/lib/facts/testers.json b/lib/facts/testers.json
deleted file mode 100644
--- a/lib/facts/testers.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "OG SquadCal testers",
- "description": "this thread contains all of the OG testers that helped tested SquadCal over the years!! THANK YOU :)",
- "introMessages": [
- "hello my dear SquadCal testers 💗",
- "first of all, thank you SO MUCH for helping to test this app over the last couple years. it means the world to me",
- "we have some big changes coming up:\n1. the app is getting renamed to Comm! we hope to submit Comm to the App Store in the next couple weeks\n2. we’re working on updating the app to use E2E encryption so that we don’t have access to your messages\n3. after that, we’re aiming to launch a self-hosted communities feature, where you can use your laptop as a server to host a chat community. sort of like Discord, except totally private",
- "as part of moving to E2E encryption, we had to figure out what to do with your existing messages, which are currently stored on my private server",
- "we don’t want to delete your messages, but we also want to be transparent about the fact that I have access to them",
- "the solution we came up with was to move them all into the very first self-hosted community on Comm: Genesis",
- "check out [this link](https://www.notion.so/Comm-Genesis-1059f131fb354250abd1966894b15951) if you want to read more :)"
- ]
-}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 10:20 PM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679034
Default Alt Text
D5107.diff (9 KB)

Event Timeline