- CommunityFollower::follow_accepted(context.pool(), community_id, person_id).await?;
-
- // Send the Subscribed message over websocket
- // Re-read the community_view to get the new SubscribedType
- let community_view = CommunityView::read(context.pool(), community_id, Some(person_id)).await?;
-
- // Get the local_user_id
- let local_recipient_id = LocalUserView::read_person(context.pool(), person_id)
- .await?
- .local_user
- .id;
-
- let response = CommunityResponse { community_view };
-
- context
- .chat_server()
- .send_user_room_message(
- &UserOperation::FollowCommunity,
- &response,
- local_recipient_id,
- None,
- )
- .await?;