ably / laravel-broadcaster

Official Laravel Ably Broadcaster
https://laravel.com/docs/broadcasting
Apache License 2.0
49 stars 7 forks source link

Update migration doc #13

Closed sacOO7 closed 1 year ago

sacOO7 commented 2 years ago
sync-by-unito[bot] commented 2 years ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-2938

qsdstefan commented 1 year ago

We found that the here method gets called only once (upon joining a channel) with Pusher.js and Ably Pusher Adapter, but with Ably Laravel Broadcaster it's called on every presence change, as per comment in presence-channel.ts

This is still the right behavior implemented by ably as per the standard channel interface https://github.com/ably-forks/laravel-echo/blob/dc323eca49f5e67446479263c55677c3016cbf64/src/channel/presence-channel.ts#L10.

qsdstefan commented 1 year ago

In addition, the members array returned in here() callback by Pusher differs from the one we're returning.

Pusher:

[
    {
        "id": 1,
        "name": "John Doe",
        "capability": [
            "subscribe",
            "history",
            "channel-metadata",
            "presence",
            "publish"
        ]
    }
]

Ably:

[
    {
        "clientId": "1",
        "action": 1,
        "data": {
            "id": 1,
            "name": "John Doe"
        },
        "encoding": null
    }
]

@sacOO7 has set out to make these objects consistent