zed-industries/zed · error · anyhow::Error
tried to join channel call directly
Error message
tried to join channel call directly
What it means
join_room detects that the target room belongs to a channel; channel rooms cannot be joined directly by room ID — clients must join through the channel mechanism so channel membership and roles are enforced.
Source
Thrown at crates/collab/src/db/queries/rooms.rs:316
connection: ConnectionId,
) -> Result<TransactionGuard<JoinRoom>> {
self.room_transaction(room_id, |tx| async move {
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
enum QueryChannelId {
ChannelId,
}
let channel_id: Option<ChannelId> = room::Entity::find()
.select_only()
.column(room::Column::ChannelId)
.filter(room::Column::Id.eq(room_id))
.into_values::<_, QueryChannelId>()
.one(&*tx)
.await?
.context("no such room")?;
if channel_id.is_some() {
Err(anyhow!("tried to join channel call directly"))?
}
let participant_index = self
.get_next_participant_index_internal(room_id, &tx)
.await?;
let result = room_participant::Entity::update_many()
.filter(
Condition::all()
.add(room_participant::Column::RoomId.eq(room_id))
.add(room_participant::Column::UserId.eq(user_id))
.add(room_participant::Column::AnsweringConnectionId.is_null()),
)
.set(room_participant::ActiveModel {
participant_index: ActiveValue::Set(Some(participant_index)),
answering_connection_id: ActiveValue::set(Some(connection.id as i32)),
answering_connection_server_id: ActiveValue::set(Some(ServerId(
connection.owner_id as i32,View on GitHub (pinned to f4178619ac)
Solutions
- Join via the channel (e.g. join_channel_buffer) instead of the raw room ID
- For direct rooms or DMs, use the normal room join flow
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/collab/src/db/queries/rooms.rs:316 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/dd462a22c2acfd22.
Report an issue: GitHub.