イベント送信時に指定の変数の値を添付出来るように

This commit is contained in:
syuilo
2019-07-07 05:12:31 +09:00
parent e97dd13e81
commit e9251debe0
4 changed files with 27 additions and 2 deletions

View File

@ -16,6 +16,10 @@ export const meta = {
event: {
validator: $.str
},
var: {
validator: $.optional.nullable.any
}
},
@ -37,6 +41,7 @@ export default define(meta, async (ps, user) => {
publishMainStream(user.id, 'pageEvent', {
pageId: ps.pageId,
event: ps.event,
var: ps.var,
user: await Users.pack(user, page.userId, {
detail: true
})