+ // Send the Subscribed message over websocket
+ // Re-read the community_view to get the new SubscribedType
+ let community_view = blocking(context.pool(), move |conn| {
+ CommunityView::read(conn, community_id, Some(person_id))
+ })
+ .await??;
+
+ // Get the local_user_id
+ let local_recipient_id = blocking(context.pool(), move |conn| {
+ LocalUserView::read_person(conn, person_id)
+ })
+ .await??
+ .local_user
+ .id;
+
+ let response = CommunityResponse { community_view };
+
+ context.chat_server().do_send(SendUserRoomMessage {
+ op: UserOperation::FollowCommunity,
+ response,
+ local_recipient_id,
+ websocket_id: None,
+ });
+