Commit 65358b31 authored by nanahira's avatar nanahira

bump

parent d2d88734
...@@ -12,10 +12,10 @@ const app = new Context({ ...@@ -12,10 +12,10 @@ const app = new Context({
}); });
// Console and sandbox // Console and sandbox
app.plugin(SandboxPlugin);
app.plugin(ConsolePlugin, { app.plugin(ConsolePlugin, {
open: false, open: false,
}); });
app.plugin(SandboxPlugin);
// Database // Database
app.plugin(DatabasePlugin); app.plugin(DatabasePlugin);
......
This diff is collapsed.
...@@ -27,13 +27,13 @@ ...@@ -27,13 +27,13 @@
}, },
"homepage": "https://github.com/koishijs/koishi-plugin-pics", "homepage": "https://github.com/koishijs/koishi-plugin-pics",
"dependencies": { "dependencies": {
"koishi-thirdeye": "^11.0.12", "koishi-thirdeye": "^11.1.0",
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"devDependencies": { "devDependencies": {
"@koishijs/plugin-console": "^4.1.1", "@koishijs/plugin-console": "^4.5.4",
"@koishijs/plugin-database-memory": "^1.4.1", "@koishijs/plugin-database-memory": "^1.5.0",
"@koishijs/plugin-sandbox": "^2.0.1", "@koishijs/plugin-sandbox": "^2.2.9",
"@types/jest": "^27.4.0", "@types/jest": "^27.4.0",
"@types/lodash": "^4.14.176", "@types/lodash": "^4.14.176",
"@types/node": "^16.11.4", "@types/node": "^16.11.4",
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
"ws": "^8.3.0" "ws": "^8.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.8.7" "koishi": "^4.9.1"
}, },
"jest": { "jest": {
"moduleFileExtensions": [ "moduleFileExtensions": [
......
...@@ -230,14 +230,14 @@ export default class PicsContainer ...@@ -230,14 +230,14 @@ export default class PicsContainer
async getSegment(url: string, bot?: Bot) { async getSegment(url: string, bot?: Bot) {
url = await this.resolveUrl(url); url = await this.resolveUrl(url);
const picData: segment.Data = { const picData = {
[(url.startsWith('base64://') && this.isOneBotBot(bot)) || [(url.startsWith('base64://') && this.isOneBotBot(bot)) ||
this.config.preferFile this.config.preferFile
? 'file' ? 'file'
: 'url']: url, : 'url']: url,
cache: true, cache: 'true',
}; };
return segment('image', picData); return segment('image', picData, []);
} }
private installDefaultMiddlewares() { private installDefaultMiddlewares() {
...@@ -287,7 +287,7 @@ export default class PicsContainer ...@@ -287,7 +287,7 @@ export default class PicsContainer
return notFound(); return notFound();
} }
let msg = await this.getSegment(result.url, bot); let msg = (await this.getSegment(result.url, bot)).toString();
if (result.description) { if (result.description) {
msg += `\n${result.description}`; msg += `\n${result.description}`;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment