completionId: cgen-d1b552e99c30433f87ed92da70320e7d
cgen-d1b552e99c30433f87ed92da70320e7d
This commit is contained in:
parent
81555415b5
commit
5fc1260735
1 changed files with 19 additions and 0 deletions
|
|
@ -76,6 +76,25 @@ export const aethexCollabService = {
|
|||
.from("team_memberships")
|
||||
.insert({ team_id: teamId, user_id: userId, role });
|
||||
if (error) throw new Error(error.message || "Unable to add member");
|
||||
|
||||
try {
|
||||
const { data: team } = await supabase
|
||||
.from("teams")
|
||||
.select("name")
|
||||
.eq("id", teamId)
|
||||
.single();
|
||||
|
||||
if (team) {
|
||||
await aethexNotificationService.createNotification(
|
||||
userId,
|
||||
"info",
|
||||
`👥 Added to Team: ${team.name}`,
|
||||
`You've been added as a ${role} to the team.`,
|
||||
);
|
||||
}
|
||||
} catch (notifError) {
|
||||
console.warn("Failed to create team member notification:", notifError);
|
||||
}
|
||||
},
|
||||
|
||||
// Projects
|
||||
|
|
|
|||
Loading…
Reference in a new issue