mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(api): stop entrance sound play probing channel existence (#2535)
This commit is contained in:
1 parent
8f4fa82a9e
commit
e805a3797f
3 files changed
+7
-17
No files matched your search
@@ -337,18 +337,13 @@ Nothing is published to the media servers. Each recipient receives a Dispatch na
|
||||
| Status | Body | Condition |
|
||||
| --- | --- | --- |
|
||||
| 204 | empty | Fan-out was attempted for every other connected account |
|
||||
| 400 | [error response](/http-api/#error-response) | Caller holds no voice state in the channel and the request returns `ENTRANCE_SOUND_INVALID_SCOPE` at the `channel_id` path, or the account owns no such clip and the request returns `ENTRANCE_SOUND_NOT_FOUND` at the `sound_id` path |
|
||||
| 404 | [error response](/http-api/#error-response) | Channel does not exist and the request returns `UNKNOWN_CHANNEL` |
|
||||
| 400 | [error response](/http-api/#error-response) | Caller holds no voice state in the channel, including when the channel does not exist, and the request returns `ENTRANCE_SOUND_INVALID_SCOPE` at the `channel_id` path, or the account owns no such clip and the request returns `ENTRANCE_SOUND_NOT_FOUND` at the `sound_id` path |
|
||||
|
||||
:::caution[Connection is the only authorisation]
|
||||
Fluxer evaluates no channel permission and checks no guild membership.
|
||||
:::
|
||||
|
||||
:::caution[Any account can probe channel existence]
|
||||
Fluxer resolves the channel before the connection check. A channel the caller is not connected to returns 400, and an ID naming no channel returns 404.
|
||||
:::
|
||||
|
||||
The connection check runs before the clip is looked up, so a caller who is not connected never learns whether the named clip exists.
|
||||
An ID naming no channel is refused exactly like a channel the caller is not connected to, so the response tells the two apart in neither direction. The connection check runs before the clip is looked up, so a caller who is not connected never learns whether the named clip exists.
|
||||
|
||||
### Side effects
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ An entrance sound is a short clip an account plays for everyone already connecte
|
||||
|
||||
Fluxer records which clip belongs to which scope and nothing more. [Play entrance sound](/http-api/entrance-sounds/#play-entrance-sound) names the clip explicitly, so the client decides which selection applies to a given channel.
|
||||
|
||||
Playback requires a voice state in the target channel and no channel permission. A caller that holds none is refused at the `channel_id` path with the validation code `ENTRANCE_SOUND_INVALID_SCOPE`. A successful call fans one [ENTRANCE_SOUND_PLAY](/gateway/events/#entrance-sound-play) Dispatch out to every other account with a voice state in the channel, at most once per account and never back to the caller. That Dispatch has the clip's CDN URL, and each recipient fetches and plays it locally, so no audio track is published for it.
|
||||
Playback requires a voice state in the target channel and no channel permission. A caller that holds none is refused at the `channel_id` path with the validation code `ENTRANCE_SOUND_INVALID_SCOPE`, and a channel ID naming no channel is refused the same way. A successful call fans one [ENTRANCE_SOUND_PLAY](/gateway/events/#entrance-sound-play) Dispatch out to every other account with a voice state in the channel, at most once per account and never back to the caller. That Dispatch has the clip's CDN URL, and each recipient fetches and plays it locally, so no audio track is published for it.
|
||||
|
||||
Every session the account holds receives the Dispatch, including sessions that are not in the channel. A client filters on `channel_id`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user