georgeboot / laravel-echo-api-gateway

Use Laravel Echo with API Gateway Websockets. Works with Bref.sh and Laravel Vapor.
MIT License
99 stars 23 forks source link

fix presence channel #15

Closed nenads closed 2 years ago

nenads commented 2 years ago

Hi love what have you done so far.

There is issue with presence channel:

  1. Auth route returns extra data:

    {"auth":"2edb16a0a48b7cb9","channel_data":"{\"user_id\":1,\"user_info\":{\"id\":1,\"name\":\"admin\"}}"}

    Channel data needs to be send over Web-Socket to correspond with auth token for that channel.

  2. Backed was json encoding string so auth would fail, since request parameter was never converted to array in first place.

codecov[bot] commented 2 years ago

Codecov Report

Merging #15 (72efe49) into master (957ce4f) will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #15   +/-   ##
=========================================
  Coverage     43.31%   43.31%           
  Complexity       53       53           
=========================================
  Files             9        9           
  Lines           344      344           
  Branches         14       14           
=========================================
  Hits            149      149           
  Misses          187      187           
  Partials          8        8           
Flag Coverage Δ
jest 54.47% <ø> (ø)
pest-8.0 37.10% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
js-src/Websocket.ts 61.42% <ø> (ø)
src/Handler.php 63.76% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 957ce4f...72efe49. Read the comment docs.

georgeboot commented 2 years ago

Thank you for your contribution!