Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions assistant/src/runtime/routes/inbound-message-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,18 @@ export async function handleChannelInbound(
// Notify the guardian about the access request so they can approve/deny.
// Only fires when a guardian binding exists and no duplicate pending
// request already exists for this requester.
notifyGuardianOfAccessRequest({
canonicalAssistantId,
sourceChannel,
externalChatId,
senderExternalUserId: body.senderExternalUserId,
senderName: body.senderName,
senderUsername: body.senderUsername,
});
try {
notifyGuardianOfAccessRequest({
canonicalAssistantId,
sourceChannel,
externalChatId,
senderExternalUserId: body.senderExternalUserId,
senderName: body.senderName,
senderUsername: body.senderUsername,
});
} catch (err) {
log.error({ err, sourceChannel, externalChatId }, 'Failed to notify guardian of access request');
}

return Response.json({ accepted: true, denied: true, reason: 'not_a_member' });
}
Expand Down