nodebb-plugin-freelog
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -14,3 +14,3 @@ const plugin = {}; | ||
const env = process.env.NODE_ENV; | ||
const signTid = env === 'production' ? 3 : 2; // 根据环境设定签到帖ID. | ||
const signTid = env === 'production' ? 3 : 3; // 根据环境设定签到帖ID. | ||
@@ -20,3 +20,8 @@ if (data.data.tid !== signTid) { | ||
} | ||
await freelogAPI.sendActivityEvent('TS000013', data.caller.uid).catch(x => console.log('签到帖子任务发送失败,uid:' + data.caller.uid)); | ||
const nodebbUserInfo = await User.getUserData(nodebbUid); | ||
const freelogUserInfo = await freelogAPI.getUserInfoByUsername(nodebbUserInfo.username); | ||
if (!freelogUserInfo) { | ||
return; | ||
} | ||
await freelogAPI.sendActivityEvent('TS000013', freelogUserInfo.userId).catch(x => console.log('签到帖子任务发送失败,uid:' + data.caller.uid)); | ||
}; | ||
@@ -23,0 +28,0 @@ |
@@ -15,4 +15,4 @@ const User = require.main.require('./src/user'); | ||
fullname: userInfo.username, | ||
picture: userInfo.headImage | ||
// email: freelogUserInfo.email 会报错,nodebb会校验邮箱 | ||
picture: userInfo.headImage, | ||
email: freelogUserInfo.email // 会报错,nodebb会校验邮箱 | ||
}); | ||
@@ -19,0 +19,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "NodeBB Forum", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "http://www.nodebb.org", | ||
@@ -8,0 +8,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8791
188