koishi-core
Advanced tools
Comparing version 2.0.0-alpha.9 to 2.0.0-alpha.10
@@ -377,3 +377,5 @@ "use strict"; | ||
: this.options.defaultAuthority || 0; | ||
const user = await this.database.observeUser(meta.userId, defaultAuthority, Array.from(userFields)); | ||
const user = meta.anonymous | ||
? koishi_utils_1.observe(database_1.createUser(meta.userId, defaultAuthority)) | ||
: await this.database.observeUser(meta.userId, defaultAuthority, Array.from(userFields)); | ||
defineProperty(meta, '$user', user); | ||
@@ -380,0 +382,0 @@ return user; |
@@ -14,5 +14,7 @@ "use strict"; | ||
? meta.$user.name | ||
: meta.sender | ||
? meta.sender.card || meta.sender.nickname | ||
: idString; | ||
: meta.anonymous | ||
? meta.anonymous.name | ||
: meta.sender | ||
? meta.sender.card || meta.sender.nickname | ||
: idString; | ||
} | ||
@@ -19,0 +21,0 @@ exports.getSenderName = getSenderName; |
{ | ||
"name": "koishi-core", | ||
"description": "Core features for Koishi", | ||
"version": "2.0.0-alpha.9", | ||
"version": "2.0.0-alpha.10", | ||
"main": "dist/index.js", | ||
@@ -39,4 +39,4 @@ "typings": "dist/index.d.ts", | ||
"get-port": "^5.1.1", | ||
"koishi-database-memory": "^2.0.0-alpha.9", | ||
"koishi-test-utils": "^4.0.0-alpha.9" | ||
"koishi-database-memory": "^2.0.0-alpha.10", | ||
"koishi-test-utils": "^4.0.0-alpha.10" | ||
}, | ||
@@ -47,3 +47,3 @@ "dependencies": { | ||
"escape-string-regexp": "^2.0.0", | ||
"koishi-utils": "^1.0.6", | ||
"koishi-utils": "^1.0.7", | ||
"leven": "^3.1.0", | ||
@@ -50,0 +50,0 @@ "ms": "^2.1.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
290438
3579
Updatedkoishi-utils@^1.0.7