Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

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

YuTengjing4aadfd608bd3
diff --git a/locales/en-US/subscription.json b/locales/en-US/subscription.json
index 025b5499b32..ec03aed1866 100644
--- a/locales/en-US/subscription.json
+++ b/locales/en-US/subscription.json
@@ -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",
diff --git a/locales/zh-CN/subscription.json b/locales/zh-CN/subscription.json
index 792d7d793b0..3f34fcb92e3 100644
--- a/locales/zh-CN/subscription.json
+++ b/locales/zh-CN/subscription.json
@@ -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 积分",
diff --git a/src/features/ChatInput/InputEditor/index.tsx b/src/features/ChatInput/InputEditor/index.tsx
index 7f817c8543b..975b0b19c53 100644
--- a/src/features/ChatInput/InputEditor/index.tsx
+++ b/src/features/ChatInput/InputEditor/index.tsx
@@ -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();
diff --git a/src/locales/default/subscription.ts b/src/locales/default/subscription.ts
index f534a44381f..9b8f8cb24d8 100644
--- a/src/locales/default/subscription.ts
+++ b/src/locales/default/subscription.ts
@@ -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',
diff --git a/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts b/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts
index 6ff9fd338a9..c4123482275 100644
--- a/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts
+++ b/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts
@@ -893,7 +893,7 @@ describe('StreamingExecutor actions', () => {
expect(generateToolsDetailed).toHaveBeenCalledWith(
expect.objectContaining({
- skipDefaultTools: undefined,
+ skipDefaultTools: false,
toolIds: ['lobe-artifacts', 'lobe-notebook'],
}),
);