This commit is contained in:
2026-08-23 09:53:56 +02:00
parent da151c13ed
commit c4170a6df3
6 changed files with 84 additions and 7 deletions
+1
View File
@@ -36,6 +36,7 @@ async fn create_channel(state: &AppState, ids: &[Uuid]) -> Result<channel::Model
channel_user::ActiveModel { channel_id: Set(channel.id), user_id: Set(*user_id), role: Set("member".into()), joined_at: Set(Utc::now()), ..Default::default() }.insert(&txn).await?;
}
txn.commit().await?;
state.services.realtime_registry.set_channel_users(channel.id, ids.iter().copied());
state.event_bus.emit("channel_created", channel.clone());
Ok(channel)
}