init
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user