diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-05 03:21:11 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-05 03:21:11 +0900 |
| commit | c2c03a1c650c0395fc4d77334ec86d00b1bb24c2 (patch) | |
| tree | 12a55d4b30ede3892a0bd747dfe386307e7eeb77 /src/api/post/create.ts | |
| parent | wip (diff) | |
| download | sharkey-c2c03a1c650c0395fc4d77334ec86d00b1bb24c2.tar.gz sharkey-c2c03a1c650c0395fc4d77334ec86d00b1bb24c2.tar.bz2 sharkey-c2c03a1c650c0395fc4d77334ec86d00b1bb24c2.zip | |
wip
Diffstat (limited to 'src/api/post/create.ts')
| -rw-r--r-- | src/api/post/create.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/api/post/create.ts b/src/api/post/create.ts index 8256cbc355..36819ec2b8 100644 --- a/src/api/post/create.ts +++ b/src/api/post/create.ts @@ -1,6 +1,5 @@ -import parseAcct from '../../acct/parse'; import Post, { pack, IPost } from '../../models/post'; -import User, { isLocalUser, isRemoteUser, IUser } from '../../models/user'; +import User, { isLocalUser, IUser } from '../../models/user'; import stream from '../../publishers/stream'; import Following from '../../models/following'; import { createHttp } from '../../queue'; @@ -25,14 +24,16 @@ export default async (user: IUser, content: { repost: IPost; media: IDriveFile[]; geo: any; - poll: any; + poll?: any; viaMobile: boolean; - tags: string[]; - cw: string; - visibility: string; + tags?: string[]; + cw?: string; + visibility?: string; uri?: string; app?: IApp; }) => new Promise<IPost>(async (res, rej) => { + if (content.visibility == null) content.visibility = 'public'; + const tags = content.tags || []; let tokens = null; |