diff --git a/keyserver/src/scripts/make-channel-private.js b/keyserver/src/scripts/make-channel-private.js new file mode 100644 index 000000000..78c7c029e --- /dev/null +++ b/keyserver/src/scripts/make-channel-private.js @@ -0,0 +1,20 @@ +// @flow + +import ashoat from 'lib/facts/ashoat'; +import { threadTypes } from 'lib/types/thread-types'; + +import { createScriptViewer } from '../session/scripts'; +import { updateThread } from '../updaters/thread-updaters'; +import { main } from './utils'; + +const channelID = '-1'; + +async function makeChannelPrivate() { + const viewer = createScriptViewer(ashoat.id); + await updateThread(viewer, { + threadID: channelID, + changes: { type: threadTypes.COMMUNITY_SECRET_SUBTHREAD }, + }); +} + +main([makeChannelPrivate]);