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

Groups that not being return #19

Open
unrealmaow opened this issue Oct 13, 2024 · 1 comment
Open

Groups that not being return #19

unrealmaow opened this issue Oct 13, 2024 · 1 comment

Comments

@unrealmaow
Copy link

Unable to receive Groups List Data.

It always shows null in response.

@unrealmaow
Copy link
Author

[Update]

Here is the updated code in Groups.js File

const groups = yield database_1.prisma.contact.findMany({
cursor: cursor ? { pkId: Number(cursor) } : undefined,
take: Number(limit),
skip: cursor ? 1 : 0,
where: {
id: { endsWith: "g.us" }, // Only groups, since group IDs in WhatsApp end with "g.us"
sessionId,
AND: search
? {
name: {
contains: String(search),
},
}
: {}, // Only add this condition if 'search' is provided
},
});

    It works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant