From 7ccbd54b01fa8d1618b44143d42214717c253d8a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 23 Apr 2022 10:49:30 +0100 Subject: [PATCH] Randomize post sending order so that no accounts is particularly favored --- posts.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/posts.py b/posts.py index 1f64d3f15..0825a9a4d 100644 --- a/posts.py +++ b/posts.py @@ -3097,6 +3097,9 @@ def _send_to_named_addresses(server, session, session_onion, session_i2p, if debug: print('DEBUG: Sending individually addressed posts: ' + str(recipients)) + # randomize the recipients list order, so that we are not favoring + # any particular account in terms of delivery time + random.shuffle(recipients) # this is after the message has arrived at the server client_to_server = False for address in recipients: @@ -3433,6 +3436,9 @@ def send_to_followers(server, session, session_onion, session_i2p, signing_priv_key_pem, 639342, domain, onion_domain, i2p_domain) else: + # randomize the order of handles, so that we are not + # favoring any particular account in terms of its delivery time + random.shuffle(follower_handles) # send to individual followers without using a shared inbox for handle in follower_handles: print('Sending post to followers ' + handle)