feat: v0.1.1 - poll editing, notifications, fixes
- Poll editing by creator (title, options, deadline) - Notification panel with app notifications and click-to-navigate - Poll creation notifies group members - Invitation rejection notifies inviter - Fix: notification createRule, timezone, autocancel, nginx, tab timing Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,27 @@ export async function respondInvitation(
|
||||
|
||||
// 更新邀请状态
|
||||
await pb.collection('invitations').update(invitationId, updateData)
|
||||
|
||||
// 通知邀请发起人
|
||||
try {
|
||||
const invitation = await pb.collection('invitations').getOne(invitationId, {
|
||||
expand: 'teamSession',
|
||||
$autoCancel: false,
|
||||
}) as any
|
||||
const { createNotification } = await import('./notifications')
|
||||
await createNotification({
|
||||
user: invitation.from,
|
||||
type: response === 'rejected' ? 'team_invite' : 'team_invite',
|
||||
title: response === 'rejected' ? '邀请被拒绝' : '邀请已接受',
|
||||
content: response === 'rejected'
|
||||
? (rejectReason || '对方拒绝了组队邀请')
|
||||
: '对方已接受组队邀请',
|
||||
relatedId: invitation.teamSession,
|
||||
relatedType: 'team',
|
||||
})
|
||||
} catch {
|
||||
// 通知失败不影响主流程
|
||||
}
|
||||
}
|
||||
|
||||
// 订阅邀请变更
|
||||
|
||||
Reference in New Issue
Block a user