waibu 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/build-locals.js +1 -1
- package/package.json +1 -1
- package/plugin/factory.js +2 -1
package/lib/build-locals.js
CHANGED
|
@@ -15,7 +15,7 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
|
|
|
15
15
|
const { set, merge, pick, get, isEmpty, find } = this.lib._
|
|
16
16
|
const { req, reply } = opts
|
|
17
17
|
|
|
18
|
-
const appTitle = this.app.waibuMpa ? this.app.waibuMpa.getAppTitle(req.ns) :
|
|
18
|
+
const appTitle = this.app.waibuMpa ? req.t(this.app.waibuMpa.getAppTitle(req.ns)) : ''
|
|
19
19
|
params.page = merge(params.page ?? {}, { ns: req.ns, appTitle })
|
|
20
20
|
set(params, 'menu.homes', buildHomesMenu.call(this))
|
|
21
21
|
|
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -292,7 +292,8 @@ async function factory (pkgName) {
|
|
|
292
292
|
}
|
|
293
293
|
const message = await render(tpl[0], locals, opts)
|
|
294
294
|
if (tpl[1]) opts.messageText = await render(tpl[1], locals, opts)
|
|
295
|
-
|
|
295
|
+
const payload = { type: 'object', data: { to, cc, bcc, from, subject, message, conn, options: opts } }
|
|
296
|
+
await this.app.masohi.send({ payload, source: this.name }, false) // mail sent through worker
|
|
296
297
|
}
|
|
297
298
|
|
|
298
299
|
unescapeBlock = (content, start, end, startReplacer, endReplacer) => {
|