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

publish message #117

Merged
merged 20 commits into from
May 23, 2024
Merged

publish message #117

merged 20 commits into from
May 23, 2024

Conversation

vladvelici
Copy link
Contributor

  • update field names for send message
  • formatting
  • create Message object for forwarding the message.created event
  • temporary: full permissions token
  • fix path to netlify functions
  • add example for using publish locally
  • on init messages: temporary remove history call, until we add history api
  • add start-silent to have a way to not open browser window every time you start the dev server
  • update dependencies
  • update readme

@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 16, 2024 11:18 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 16, 2024 11:22 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 16, 2024 11:33 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 16, 2024 14:57 Inactive
@@ -30,6 +30,7 @@ Please see README.md for more details on configuring your Ably API Key.`);
capability: {
'room:*': ['publish', 'subscribe', 'presence'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this capability now, as we're not using room: anymore?

@@ -64,25 +64,24 @@ export class Messages extends EventEmitter<MessageEventsMap> {
async send(text: string): Promise<Message> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be able to add typedocs for this file? :)

@AndyTWF
Copy link
Collaborator

AndyTWF commented May 17, 2024

Related, I noticed ably-js doesn't like wildcard capabilities, so I opened this PR over there to allow it: ably/ably-js#1765

@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 17, 2024 14:02 Inactive
@AndyTWF AndyTWF force-pushed the publish-message branch from 82962aa to e6ffd5c Compare May 21, 2024 06:54
@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 21, 2024 06:54 Inactive
src/Messages.ts Outdated
return true;
}
default:
throw new Ably.ErrorInfo(`Received illegal event="${name}"`, 400, 4000);
Copy link
Contributor

@splindsay-92 splindsay-92 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not something you changed, just saw it is all, but I think the error code is wrong 👀 Should be 40,000 I think..

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this change

@AndyTWF AndyTWF force-pushed the publish-message branch 2 times, most recently from 13e2df0 to 3f5203e Compare May 23, 2024 05:58
@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 23, 2024 05:58 Inactive
@AndyTWF AndyTWF force-pushed the publish-message branch from 3f5203e to 0f64ea9 Compare May 23, 2024 07:41
@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 23, 2024 07:42 Inactive
Copy link
Collaborator

@AndyTWF AndyTWF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving everything except the tests, which I added.

@splindsay-92 would you mind reviewing the tests?

@AndyTWF AndyTWF requested a review from splindsay-92 May 23, 2024 07:43
@github-actions github-actions bot temporarily deployed to staging/pull/117/typedoc May 23, 2024 07:55 Inactive
Copy link
Contributor

@splindsay-92 splindsay-92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a comment, but its a small thing that probably can be left if we just want to get it merged :)

}),
);
});
});

describe('subscribing to updates', () => {
it<TestContext>('should not miss events that came before last messages has been fetched and emit them after', (context) =>
new Promise<void>((done) => {
it<TestContext>('subscribing to messages should work live', (context) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these tests still needed? Looks like some repeated functionality and isn't testing more than the integration tests are doing?

@AndyTWF AndyTWF merged commit 5903bc3 into main May 23, 2024
6 checks passed
@AndyTWF AndyTWF deleted the publish-message branch July 10, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants