Help us make Mixer better for everyone.

Multi-Channel Single-Connection interface

I'd like to see multiple channels chat handled under a single connection. The gist being something along the lines of:

Authorization should take place with the websocket upgrade request resulting in the connection.

Joining a specific channel's chat
- If the channel id does not exist an error should be returned in the reply
- if a join method has already succeed on the connection for the channel id, an error should be returned in the reply
```
// Client:
{
"type": "method",
"method": "join",
"arguments": _channel_id_,
"id": _method_id_
}
// Server:
{
"type": "reply",
"error": null,
"data": {
"authenticated": true,
"roles": ["Owner"]
},
"id", _method_id_
}
```

Leaving a specific channel's chat
- If the channel id does not exist an error should be returned in the reply
- If the channel has not yet been joined for the connection an error should be returned in the reply
```
// Client
{
"type": "method",
"method": "leave",
"arguments": [_channel_id_],
"id": _method_id_
}
// server
{
"type": "reply",
"error": null,
"data": null,
"id": _method_id_
}
```

Once a channel has been joined, all other methods' first argument* is the channel id inwhich to interact with.
- If the channel id does not exist an error should be returned in the reply
- If the channel id has not previously been `join`ed for the connection an error should be returned
```
{"type": "method", "method": "msg", "arguments": [_channel_id_, "Hello world :)"], "id": _method_id_}
{"type": "method", "method": "vote", "arguments": [_channel_id_, 0], "id": _method_id_}
```

All events are required to contain a `channel` property identifying which channel the event took place on*
```
{
"channel": 12345,
"id": "cfa8a5b0-2ec5-11e6-1234-f3d652ffec28",
"user_name": "Username",
"user_id": 12345,
"user_roles": [
"User"
],
"message": {
"message": [{
"type": "text",
"data": "Hello! ",
"text": "Hello! "
}],
"meta": {}
}
}
```

*: Potentially, this could not be required for whispers as its been stated that beam would like to de-couple whispers from a specific channel's scopes

7 votes
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

SReject shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base