This commit is contained in:
2026-08-29 18:39:28 +02:00
parent 88ad3c389f
commit 9551e90678
17 changed files with 642 additions and 269 deletions
+7 -1
View File
@@ -3,6 +3,7 @@ use crate::domain::dto::conversation::{
ConversationParticipantResponse, ConversationResponse, CreateConversationRequest,
ForkConversationRequest,
};
use crate::domain::events::channel::ChannelCreatedEvent;
use crate::http::context::CurrentUser;
use crate::http::error::HTTPError;
use crate::models::{channel, channel_user, message, user};
@@ -107,7 +108,12 @@ async fn create_channel(state: &AppState, ids: &[Uuid]) -> Result<channel::Model
.services
.realtime_registry
.set_channel_users(channel.id, ids.iter().copied());
state.event_bus.emit("channel_created", channel.clone());
state.event_bus.emit(
"channel_created",
ChannelCreatedEvent {
channel: channel.clone(),
},
);
Ok(channel)
}