mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Fix battle chats properly (without involving the database)
This commit is contained in:
@@ -31,8 +31,10 @@ impl SimpleOperation<()> for JoinChannelProvider {
|
||||
}
|
||||
let user_info = user.user()?;
|
||||
//let chat_user = super::get_chat_user(user_info.as_ref().as_ref());
|
||||
self.chat_system.system_mut().await.join_channel(user_info.public_id().to_owned(), chann_name.string.clone());
|
||||
let response = user_info.add_subscribed_channel(chann_name.string, crate::data::channel::ChatChannelType::from_u8(chann_ty as _)?).await?;
|
||||
let ty = crate::data::channel::ChatChannelType::from_u8(chann_ty as _)?;
|
||||
log::info!("User {} wants to join channel {} ({:?})", user_info.display_name().to_owned(), chann_name.string, ty);
|
||||
self.chat_system.system_mut().await.join_channel(user_info.display_name().to_owned(), chann_name.string.clone(), ty);
|
||||
let response = user_info.add_subscribed_channel(chann_name.string, ty).await?;
|
||||
params.insert(CHANNEL_INFO_PARAM_KEY, response);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user