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(core): socket pushes not working #82

Merged
merged 13 commits into from
Mar 28, 2022
Merged

fix(core): socket pushes not working #82

merged 13 commits into from
Mar 28, 2022

Conversation

kkopanidis
Copy link
Contributor

The io object seems weird in its behaviour,
but the changes should allow for connected
sockets to receive the data correctly

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

The io object seems weird in its behaviour,
but the changes should allow for connected
sockets to receive the data correctly
@kkopanidis
Copy link
Contributor Author

Proper testing is needed, I'm still facing network issues.

kon14 and others added 11 commits March 24, 2022 17:11
* fix(router,admin): Admin Swagger using User headers
* fix(router,admin): Admin Swagger routes not prefixed by '/admin'
* chore(admin): Bearer prefix for admin Authentication header
refactor(grpc-sdk): remove sleep functions and add utility sleep function
refactor(grpc-sdk): modify router async functions for consistency
refactor(grpc-sdk): remove sleep functions and add utility sleep function
refactor(grpc-sdk): modify router async functions for consistency
refactor(chat): change router usage to routing manager
fix(grpc-sdk): socket usage in routing manager
fix(chat): socket communication
refactor(push-notifications): migrate to new router
refactor(storage): migrate to new router
refactor(forms): migrate to new router
fix(grpc-sdk): routing manager would declare routes even when there weren't any
fix(forms): unnecessary check for form existence
fix(grpc-sdk): unparsed socket response data type
fix(push-notifications): left over getter call
refactor(database): use new route declaration methods
fix(database): url params weren't being added to path
refactor(grpc-sdk): moved RouterBuilder to separate file
refactor(grpc-sdk): rename build to add in RouterBuilder
add(grpc-sdk): proper build function in RouterBuilder
refactor(grpc-sdk): changed RoutingManager get/put etc
* feat(containers); database env vars
fix(containers): postgres

* fix(containers): master key env var not passed to Core

* fix(containers): pass DB_PORT to mongodb and postgres

* fix(containers): Makefile start-database

* fix(containers): fix MongoDB
chore(containers): bump Conduit versiot to v0.12.3
fix(chat): socket routes
chore(router): fix typo
@@ -299,7 +299,7 @@ export class ChatRoutes {

async onMessage(call: ParsedSocketRequest): Promise<UnparsedSocketResponse> {
const { user } = call.request.context;
const [roomId, message] = call.request.params;
const { roomId, message } = call.request.params;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be [ roomId, message ]. Socket params are an array.

@@ -323,7 +323,7 @@ export class ChatRoutes {

async onMessagesRead(call: ParsedSocketRequest): Promise<UnparsedSocketResponse> {
const { user } = call.request.context;
const [roomId] = call.request.params;
const { roomId } = call.request.params;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same ^

Copy link
Contributor

@kon14 kon14 left a comment

Choose a reason for hiding this comment

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

ParsedSocketRequest's call.request.params are an array.
Object destructuring will produce undefined.

@kkopanidis
Copy link
Contributor Author

@kon14 slow down, I'm looking at these right now, I only resolved conflicts previously. Even without the resolution it wouldn't work there are multiple typing issues.

fix(chat): param extraction for socket routes

still not convinced this works
@kon14 kon14 self-requested a review March 28, 2022 09:19
@kon14 kon14 mentioned this pull request Mar 28, 2022
8 tasks
@kkopanidis kkopanidis merged commit d4232ef into main Mar 28, 2022
@kkopanidis kkopanidis deleted the socket-push-fix branch March 28, 2022 12:44
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