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

fix: markRead and markUnread can be called from server-side #1228

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

szuperaz
Copy link
Contributor

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

The markRead and markUnread calls should be available on server-side, but a client-side permission check made it impossible to call them before. This PR fixes that.

After the merge these calls will work on server-side:

const channel = streamClient.channel(
  "<channel type>",
  "<channel id>"
);

channel
  .markRead({
    user_id: "<user id>",
  })
  .then(console.log)
  .catch(console.error);

channel
  .markUnread({
    message_id: "<message id>",
    user_id: "<user id>",
  })
  .then(console.log)
  .catch(console.error);

Changelog

  • fix: markRead and markUnread can be called from server-side

Copy link
Contributor

Size Change: +102 B (0%)

Total Size: 346 kB

Filename Size Change
dist/browser.es.js 74.7 kB +22 B (0%)
dist/browser.full-bundle.min.js 45 kB +13 B (0%)
dist/browser.js 75.5 kB +23 B (0%)
dist/index.es.js 74.7 kB +22 B (0%)
dist/index.js 75.5 kB +22 B (0%)

compressed-size-action

@szuperaz szuperaz merged commit c477fef into master Feb 16, 2024
5 of 6 checks passed
@szuperaz szuperaz deleted the fix-mark-unread-cant-be-called-from-server-side branch February 16, 2024 13:04
This was referenced Feb 21, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants