mirror of https://gitlab.com/bashrc2/epicyon
Randomize post sending order so that no accounts is particularly favored
parent
2da40cdf94
commit
7ccbd54b01
6
posts.py
6
posts.py
|
@ -3097,6 +3097,9 @@ def _send_to_named_addresses(server, session, session_onion, session_i2p,
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Sending individually addressed posts: ' +
|
print('DEBUG: Sending individually addressed posts: ' +
|
||||||
str(recipients))
|
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
|
# this is after the message has arrived at the server
|
||||||
client_to_server = False
|
client_to_server = False
|
||||||
for address in recipients:
|
for address in recipients:
|
||||||
|
@ -3433,6 +3436,9 @@ def send_to_followers(server, session, session_onion, session_i2p,
|
||||||
signing_priv_key_pem, 639342,
|
signing_priv_key_pem, 639342,
|
||||||
domain, onion_domain, i2p_domain)
|
domain, onion_domain, i2p_domain)
|
||||||
else:
|
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
|
# send to individual followers without using a shared inbox
|
||||||
for handle in follower_handles:
|
for handle in follower_handles:
|
||||||
print('Sending post to followers ' + handle)
|
print('Sending post to followers ' + handle)
|
||||||
|
|
Loading…
Reference in New Issue