diff --git a/apps/character/ImgUpload.js b/apps/character/ImgUpload.js index 563ca0ff..8918b165 100644 --- a/apps/character/ImgUpload.js +++ b/apps/character/ImgUpload.js @@ -54,7 +54,7 @@ export async function uploadCharacterImg (e) { if (val.type === 'image') { imageMessages.push(val) } else if (val.type === 'xml') { // 支持合并转发消息内置的图片批量上传,喵喵 喵喵喵? 喵喵喵喵 - let resid = val.data.match(/m_resid="(\d|\w|\/)*"/)[0].replace(/m_resid=|"/g, '') + let resid = val.data.match(/m_resid="(\d|\w|\/|\+)*"/)[0].replace(/m_resid=|"/g, '') if (!resid) break let message = await Bot.getForwardMsg(resid) for (const item of message) { @@ -132,7 +132,7 @@ async function saveImages (e, name, imageMessages) { } async function isAllowedToUploadCharacterImage (e) { - let sendMsg = e.msg.includes('上传') ? '添加' : '删除' + let sendMsg = /上传|添加/.test(e.msg) ? '添加' : '删除' if (!e.message) { return false } diff --git a/apps/character/ProfileUtils.js b/apps/character/ProfileUtils.js index e22f19b3..9ecb9e9c 100644 --- a/apps/character/ProfileUtils.js +++ b/apps/character/ProfileUtils.js @@ -24,7 +24,7 @@ export async function getOriginalPicture (e) { if (source) { let imgPath = await redis.get(`miao:original-picture:${source.message_id}`) if (imgPath) { - e.reply([segment.image(process.cwd() + '/plugins/miao-plugin/resources/' + imgPath)]) + e.reply([segment.image(process.cwd() + '/plugins/miao-plugin/resources/' + decodeURIComponent(imgPath))]) return true } if (source.time) {