🐛 fix: require valid action for referral backfill and add anti-abuse rule (#12958)

This commit is contained in:
YuTengjing
2026-03-14 01:48:07 +08:00
committed by GitHub
parent 942412155e
commit 4aadfd608b
5 changed files with 10 additions and 5 deletions

View File

@@ -296,6 +296,7 @@
"referral.inviteCode.title": "My Referral Code",
"referral.inviteLink.description": "Copy the link and share with friends. Complete registration to receive rewards",
"referral.inviteLink.title": "Referral Link",
"referral.rules.antiAbuse": "If fraudulent activity is detected (e.g., mass registration of disposable email accounts), the associated accounts will be permanently banned",
"referral.rules.backfill.alreadyBound": "You have already bound an invite code",
"referral.rules.backfill.description": "Forgot to enter invite code? You can backfill within 3 days of registration",
"referral.rules.backfill.expiredTip": "Backfill period has expired. Cannot backfill after 3 days of registration",
@@ -306,7 +307,7 @@
"referral.rules.backfill.title": "Backfill Invite Code",
"referral.rules.description": "Learn about referral reward program rules",
"referral.rules.expiry": "Credit validity: Available referral credits will be cleared after 100 days of user inactivity",
"referral.rules.missedCode": "Missed invite code: You can <0>backfill</0> within 3 days of registration",
"referral.rules.missedCode": "Missed invite code: You can <0>backfill</0> within 3 days of registration. After backfilling, you still need to perform a valid action to receive rewards",
"referral.rules.priority": "Credit consumption priority: Free credits → Subscription credits → Referral credits → Top-up credits",
"referral.rules.registration": "Registration method: Invited users register via referral link or enter referral code on registration page",
"referral.rules.reward": "Reward: Referrer and invitee each receive {{reward}}M credits",

View File

@@ -296,6 +296,7 @@
"referral.inviteCode.title": "我的推荐码",
"referral.inviteLink.description": "复制链接并分享给好友,完成注册即可获得奖励",
"referral.inviteLink.title": "推荐链接",
"referral.rules.antiAbuse": "如检测到通过不正当手段获取积分(如批量注册临时邮箱账号),相关账号将被永久封禁",
"referral.rules.backfill.alreadyBound": "你已经绑定过邀请码",
"referral.rules.backfill.description": "忘记填写邀请码?注册三天内可以补填",
"referral.rules.backfill.expiredTip": "补填期限已过,注册超过三天后无法补填",
@@ -306,7 +307,7 @@
"referral.rules.backfill.title": "补填邀请码",
"referral.rules.description": "了解推荐奖励计划规则",
"referral.rules.expiry": "积分有效期:用户 100 天未活跃后,返利积分将被清除",
"referral.rules.missedCode": "忘记填写邀请码:注册三天内可以<0>补填邀请码</0>",
"referral.rules.missedCode": "忘记填写邀请码:注册三天内可以<0>补填邀请码</0>,补填后需完成一次有效操作才可获得奖励",
"referral.rules.priority": "积分使用优先级:免费积分 → 订阅积分 → 返利积分 → 充值积分",
"referral.rules.registration": "注册方式:被邀请用户通过推荐链接注册或在注册页输入推荐码",
"referral.rules.reward": "奖励:邀请人和被邀请人各获得 {{reward}}M 积分",

View File

@@ -186,6 +186,8 @@ const InputEditor = memo<{ defaultRows?: number }>(({ defaultRows = 2 }) => {
style={{
minHeight: defaultRows > 1 ? defaultRows * 23 : undefined,
}}
onCompositionEnd={({ event }) => compositionProps.onCompositionEnd(event)}
onCompositionStart={({ event }) => compositionProps.onCompositionStart(event)}
onInit={(editor) => storeApi.setState({ editor })}
onBlur={() => {
disableScope(HotkeyEnum.AddUserMessage);
@@ -193,7 +195,6 @@ const InputEditor = memo<{ defaultRows?: number }>(({ defaultRows = 2 }) => {
onChange={() => {
updateMarkdownContent();
}}
{...compositionProps}
onContextMenu={async ({ event: e, editor }) => {
if (isDesktop) {
e.preventDefault();

View File

@@ -351,7 +351,7 @@ export default {
'referral.rules.expiry':
'Credit validity: Available referral credits will be cleared after 100 days of user inactivity',
'referral.rules.missedCode':
'Missed invite code: You can <0>backfill</0> within 3 days of registration',
'Missed invite code: You can <0>backfill</0> within 3 days of registration. After backfilling, you still need to perform a valid action to receive rewards',
'referral.rules.priority':
'Credit consumption priority: Free credits → Subscription credits → Referral credits → Top-up credits',
'referral.rules.registration':
@@ -360,6 +360,8 @@ export default {
'referral.rules.title': 'Program Rules',
'referral.rules.validInvitation':
'Valid invitation: Invitee registers with your referral code and performs one valid action',
'referral.rules.antiAbuse':
'If fraudulent activity is detected (e.g., mass registration of disposable email accounts), the associated accounts will be permanently banned',
'referral.rules.validOperation':
'Valid action criteria: Send one message on Chat page, or generate one image on image page',
'referral.stats.availableBalance': 'Available Balance',

View File

@@ -893,7 +893,7 @@ describe('StreamingExecutor actions', () => {
expect(generateToolsDetailed).toHaveBeenCalledWith(
expect.objectContaining({
skipDefaultTools: undefined,
skipDefaultTools: false,
toolIds: ['lobe-artifacts', 'lobe-notebook'],
}),
);