Skip to content

Commit

Permalink
Backport moderation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Jan 24, 2024
1 parent 62512f3 commit f89d993
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ public void run() {
.filter(peer -> (client.isModerating() || !peer.isModerating())) // ignore moderators

.forEach(peer -> {
// connect with these
client.getRtcSessionManager().requestLinkage(peer, true);
// am I moderating compared to this peer?
boolean isModerating = client.isModerating() && !peer.isModerating();

// only setup mutual connection if out moderation state is the same
client.getRtcSessionManager().requestLinkage(peer, !isModerating);

// add them as a recent if we already have its data cached
if (client.getDataCache() != null) {
client.getDataCache().pushPeerName(peer.getOwner().getName());
Expand Down

0 comments on commit f89d993

Please sign in to comment.