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

Error parsing - Soft Delete Message #182

Open
manfe opened this issue Oct 15, 2024 · 3 comments
Open

Error parsing - Soft Delete Message #182

manfe opened this issue Oct 15, 2024 · 3 comments

Comments

@manfe
Copy link

manfe commented Oct 15, 2024

I soft delete message

And when I try to get the message.deleted property is returning:

image

[Exception: TypeError: Cannot read properties of undefined (reading 'length') at get deleted (webpack-internal:///(app-pages-browser)/./node_modules/@pubnub/chat/dist/index.es.js:24:10057) at b.invokeGetter (<anonymous>:3:28)]

This [type][type] can be the issue?

https://github.com/pubnub/js-chat/blob/0d2d26139d1f282fdd4d664670190f6a1c4803b2/lib/src/entities/message.ts#L222C38-L222C73

@manfe
Copy link
Author

manfe commented Oct 15, 2024

BTW, I tried to remove one [type], but that is marking as false it stopped the undefined error, but not working as expected.

I am going to use the message.actions.deleted to overcome this issue for now.

@manfe
Copy link
Author

manfe commented Oct 15, 2024

Here is the return for the this.actions on this line

{
  deleted: {
    ".": [
      { 
        uuid: "admin-43",
        actionTimetoken: "17290191373945210"
      }
    ];
  }
}

Also a screen shot just for reference:

image

@piotr-suwala
Copy link
Contributor

Thank you for reporting the issue. We will take a look at this at the next planning session.

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