Mean-field approximation techniques are widely used to model dynamics of large complex stochastic systems, which are extremely difficult to describe using precise equations. However, in the context of the modelling of social systems, such an approach may lead to inaccurate solutions, as real-life social networks feature structurality whereby individuals form their ego-graphs not at random. Resulting social networks are modular and tend to include dense groups of vertices-communities-whose presence may seriously affect various processes in networks, including information dissemination, innovation diffusion, and opinion formation. Besides this, communication networks that establish on social media platforms display substantial activity heterogeneity and are subject to individuals' cognitive biases and the moderation by personalization systems. In this vein, naive aggregation techniques may fail to cope. This paper considers a model that describes how a structured population of individuals update their opinions following pairwise stochastic interactions. For this model we develop a mean-field approximation that accounts for all the roadblock factors mentioned above and investigates the key properties of the resulting master equation.