diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-05-10 14:18:18 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-05-10 14:18:18 +0900 |
| commit | 7c714f57889b7e56cf7f53f0453de45d36541143 (patch) | |
| tree | 0e444dc43c383c1eac5933901dc84f4da39db9e3 /src | |
| parent | Update ObjectStorage example (#4890) (diff) | |
| download | misskey-7c714f57889b7e56cf7f53f0453de45d36541143.tar.gz misskey-7c714f57889b7e56cf7f53f0453de45d36541143.tar.bz2 misskey-7c714f57889b7e56cf7f53f0453de45d36541143.zip | |
Improve MisskeyPages
Diffstat (limited to 'src')
| -rw-r--r-- | src/misc/aiscript/evaluator.ts | 5 | ||||
| -rw-r--r-- | src/misc/aiscript/index.ts | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/misc/aiscript/evaluator.ts b/src/misc/aiscript/evaluator.ts index 2100b565d4..664e0037ab 100644 --- a/src/misc/aiscript/evaluator.ts +++ b/src/misc/aiscript/evaluator.ts @@ -31,7 +31,7 @@ export class ASEvaluator { VERSION: opts.version, URL: opts.page ? `${opts.url}/@${opts.page.user.username}/pages/${opts.page.name}` : '', LOGIN: opts.visitor != null, - NAME: opts.visitor ? opts.visitor.name : '', + NAME: opts.visitor ? opts.visitor.name || opts.visitor.username : '', USERNAME: opts.visitor ? opts.visitor.username : '', USERID: opts.visitor ? opts.visitor.id : '', NOTES_COUNT: opts.visitor ? opts.visitor.notesCount : 0, @@ -42,7 +42,8 @@ export class ASEvaluator { MY_FOLLOWERS_COUNT: opts.user ? opts.user.followersCount : 0, MY_FOLLOWING_COUNT: opts.user ? opts.user.followingCount : 0, SEED: opts.randomSeed ? opts.randomSeed : '', - YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}` + YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`, + NULL: null }; } diff --git a/src/misc/aiscript/index.ts b/src/misc/aiscript/index.ts index 4e1d5591f4..236b332da7 100644 --- a/src/misc/aiscript/index.ts +++ b/src/misc/aiscript/index.ts @@ -127,6 +127,7 @@ export const envVarsDef: Record<string, Type> = { MY_FOLLOWING_COUNT: 'number', SEED: null, YMD: 'string', + NULL: null, }; export function isLiteralBlock(v: Block) { |