diff --git a/keyserver/src/scripts/create-community.js b/keyserver/src/scripts/create-community.js new file mode 100644 --- /dev/null +++ b/keyserver/src/scripts/create-community.js @@ -0,0 +1,20 @@ +// @flow + +import ashoat from 'lib/facts/ashoat'; +import { threadTypes } from 'lib/types/thread-types'; + +import { createThread } from '../creators/thread-creator'; +import { createScriptViewer } from '../session/scripts'; +import { main } from './utils'; + +const communityName = 'New community'; + +async function createCommunity() { + const ashoatViewer = createScriptViewer(ashoat.id); + await createThread(ashoatViewer, { + type: threadTypes.COMMUNITY_ROOT, + name: communityName, + }); +} + +main([createCommunity]);