1 use actix_web::web::Data;
2 use lemmy_api_common::community::CommunityResponse;
3 use lemmy_utils::ConnectionId;
4 use lemmy_websocket::{messages::SendCommunityRoomMessage, LemmyContext, UserOperation};
11 pub(in crate::community) fn send_community_websocket(
12 res: &CommunityResponse,
13 context: &Data<LemmyContext>,
14 websocket_id: Option<ConnectionId>,
17 // Strip out the person id and subscribed when sending to others
18 let mut res_sent = res.clone();
19 res_sent.community_view.subscribed = false;
21 context.chat_server().do_send(SendCommunityRoomMessage {
24 community_id: res.community_view.community.id,