Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(all): Add reply to convo #154

Merged
merged 19 commits into from
Mar 26, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix types
  • Loading branch information
McPizza0 committed Mar 24, 2024
commit 42a44c53423e23936c8830cf17f7dea3f5604130
11 changes: 3 additions & 8 deletions apps/platform/trpc/routers/convoRouter/convoRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ export const convoRouter = router({
z.object({
participantsOrgMembersPublicIds: z.array(typeIdValidator('orgMembers')),
participantsGroupsPublicIds: z.array(typeIdValidator('groups')),
participantsContactsPublicIds: z.array(
typeIdValidator('orgMemberProfile')
),
participantsContactsPublicIds: z.array(typeIdValidator('contacts')),
participantsEmails: z.array(z.string()),
sendAsEmailIdentityPublicId:
typeIdValidator('emailIdentities').optional(),
Expand Down Expand Up @@ -332,13 +330,10 @@ export const convoRouter = router({
// validate the publicIds of Contacts and get the IDs
if (
participantsContactsPublicIds &&
participantsContactsPublicIds.length
participantsContactsPublicIds.length > 0
) {
const contactResponses = await db.query.contacts.findMany({
where: inArray(
orgMemberProfiles.publicId,
participantsContactsPublicIds
),
where: inArray(contacts.publicId, participantsContactsPublicIds),
columns: {
id: true
}
Expand Down