diff --git a/bin/mastodon-data.js b/bin/mastodon-data.js index 24b1459..11b6802 100644 --- a/bin/mastodon-data.js +++ b/bin/mastodon-data.js @@ -12,6 +12,20 @@ export const actions = times(30, i => ({ text: 'hello world' } }, + { + user: 'admin', + post: { + text: '@foobar hello foobar', + privacy: 'unlisted' + } + }, + { + user: 'foobar', + post: { + text: '@admin hello admin', + privacy: 'unlisted' + } + }, { user: 'foobar', post: { @@ -87,8 +101,8 @@ export const actions = times(30, i => ({ { user: 'admin', post: { - text: '@foobar hello foobar', - privacy: 'unlisted' + text: '@foobar direct', + privacy: 'direct' } }, { @@ -150,6 +164,10 @@ export const actions = times(30, i => ({ user: 'admin', boost: 1 }, + { + user: 'admin', + boost: 2 + }, { user: 'admin', favorite: 2 @@ -159,7 +177,7 @@ export const actions = times(30, i => ({ post: { internalId: 5, text: 'pinned toot 1', - privacy: 'private' + privacy: 'unlisted' } }, { @@ -167,7 +185,7 @@ export const actions = times(30, i => ({ post: { internalId: 6, text: 'pinned toot 2', - privacy: 'private' + privacy: 'unlisted' } } ]).concat(times(25, i => ({ @@ -175,7 +193,7 @@ export const actions = times(30, i => ({ post: { internalId: 100 + i, text: 'unlisted thread ' + (i + 1), - privacy: 'private', + privacy: 'unlisted', inReplyTo: i > 0 && (100 + i) } }))).concat([ @@ -187,6 +205,10 @@ export const actions = times(30, i => ({ user: 'quux', pin: 6 }, + { + user: 'admin', + boost: 5 + }, { user: 'admin', favorite: 5 @@ -203,21 +225,21 @@ export const actions = times(30, i => ({ user: 'ExternalLinks', post: { text: 'here are some hashtags: #kitten #kitties', - privacy: 'private' + privacy: 'unlisted' } }, { user: 'ExternalLinks', post: { text: 'here are some external links: https://joinmastodon.org https://github.com/tootsuite/mastodon', - privacy: 'private' + privacy: 'unlisted' } }, { user: 'ExternalLinks', post: { text: 'here are some users: @admin @quux', - privacy: 'private' + privacy: 'unlisted' } } ]) \ No newline at end of file diff --git a/bin/restore-mastodon-data.js b/bin/restore-mastodon-data.js index 3874e0b..ff7fea5 100644 --- a/bin/restore-mastodon-data.js +++ b/bin/restore-mastodon-data.js @@ -52,6 +52,7 @@ export async function restoreMastodonData () { } else if (action.boost) { await reblogStatus('localhost:3000', accessToken, internalIdsToIds[action.boost]) } + await new Promise(resolve => setTimeout(resolve, 2000)) } console.log('Restored mastodon data') } \ No newline at end of file diff --git a/bin/run-mastodon.js b/bin/run-mastodon.js index 09e0c1a..df9d86c 100644 --- a/bin/run-mastodon.js +++ b/bin/run-mastodon.js @@ -75,8 +75,8 @@ async function main () { await setupMastodonDatabase() await runMastodon() await waitForMastodonApiToStart() - await waitForMastodonUiToStart() await restoreMastodonData() + await waitForMastodonUiToStart() } process.on('SIGINT', function () {