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

[Bug] Get user messages engagement_status unarchived status #81

Closed
hizegi opened this issue Nov 22, 2024 · 2 comments
Closed

[Bug] Get user messages engagement_status unarchived status #81

hizegi opened this issue Nov 22, 2024 · 2 comments

Comments

@hizegi
Copy link

hizegi commented Nov 22, 2024

With the recent release of v0.6.15 for getting user messages, I was trying to retrieve unarchived messages by using the newly added engagement_status filter.

The API docs state that I could use

engagement_status:
One or more of `read`, `unread`, `seen`, `unseen`. Limits results to messages with the given engagement status(es).

And the code changes in the release PR seem to allow other parameters to be filterable for engagement_status:

engagement_status?: MessageEngagementStatusFilter[];
...
type MessageEngagementStatusFilter =
  | MessageEngagementStatus
  | "unseen"
  | "unread"
  | "unarchived";

Reproduce

await knockClient.users.getMessages(userId, {
    engagement_status: ['unarchived'],
  })

Returns the error:

 Error GenericServerException {
    status: 500,
   requestID: 'GAohPiG2hN3ZvLYE2A6B',
   name: 'GenericServerException',
   message: 'The request could not be completed.'
 }

Other filters like status are continuing to work as expected.

Is there a way to fetch a user's unarchived messages? Thank you.

@hizegi hizegi changed the title Get user messages engagement_status unarchived bug [Bug] Get user messages engagement_status unarchived status Nov 22, 2024
@mattmikolay
Copy link

Hi @hizegi! Thanks for reporting this issue, and I’m sorry you encountered trouble.

This is due to a bug in Knock’s backend that prevents filtering messages by "archived", "unarchived", "interacted", and "link_clicked" engagement statuses. We’re actively working on a fix, and we’ll let you know when we have an update.

@mattmikolay
Copy link

Hi @hizegi. Thanks for your patience. This should be fixed now. I’m going to close this issue, but feel free to reopen it if you’re still having trouble.

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

2 participants