From ea3fb4b1814d9e6675ee6cb11d98f389c538cae2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 22 Apr 2022 17:45:17 +0100 Subject: [PATCH 1/4] Shorter text --- translations/en.json | 2 +- translations/oc.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/en.json b/translations/en.json index 295551969..3407eb18f 100644 --- a/translations/en.json +++ b/translations/en.json @@ -179,7 +179,7 @@ "Instance Short Description": "Instance Short Description", "Instance Description": "Instance Description", "Instance Logo": "Instance Logo", - "Bookmark this post": "Save this for later viewing", + "Bookmark this post": "Bookmark", "Undo the bookmark": "Unbookmark", "Bookmarks": "Saved", "Theme": "Theme", diff --git a/translations/oc.json b/translations/oc.json index f11b3c7e3..19e4d858d 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -175,7 +175,7 @@ "Instance Short Description": "Instance Short Description", "Instance Description": "Instance Description", "Instance Logo": "Instance Logo", - "Bookmark this post": "Save this for later viewing", + "Bookmark this post": "Bookmark", "Undo the bookmark": "Undo the bookmark", "Bookmarks": "Saved", "Theme": "Theme", From 2da40cdf94711a4571b3ee0bdb150b880a234b3f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 22 Apr 2022 17:49:40 +0100 Subject: [PATCH 2/4] Shorter text --- translations/en.json | 2 +- translations/oc.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/en.json b/translations/en.json index 3407eb18f..3a09dd809 100644 --- a/translations/en.json +++ b/translations/en.json @@ -495,7 +495,7 @@ "Content License": "Content License", "Reaction by": "Reaction by", "Notify on emoji reactions": "Notify on emoji reactions", - "Select reaction": "Select reaction", + "Select reaction": "Reaction", "Don't show the Reaction button": "Don't show the Reaction button", "New feed URL": "New feed URL", "New link title and URL": "New link title and URL", diff --git a/translations/oc.json b/translations/oc.json index 19e4d858d..469d5f0d0 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -491,7 +491,7 @@ "Content License": "Content License", "Reaction by": "Reaction by", "Notify on emoji reactions": "Notify on emoji reactions", - "Select reaction": "Select reaction", + "Select reaction": "Reaction", "Don't show the Reaction button": "Don't show the Reaction button", "New feed URL": "New feed URL", "New link title and URL": "New link title and URL", From 7ccbd54b01fa8d1618b44143d42214717c253d8a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 23 Apr 2022 10:49:30 +0100 Subject: [PATCH 3/4] 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) From cb1cd531eb5a6db9504c0a17b27e5c1baf9eb899 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 23 Apr 2022 11:05:51 +0100 Subject: [PATCH 4/4] Randomize the sequence of instances a post is sent out to --- posts.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index 0825a9a4d..8f91ab740 100644 --- a/posts.py +++ b/posts.py @@ -3307,12 +3307,21 @@ def send_to_followers(server, session, session_onion, session_i2p, elif domain.endswith('.i2p'): curr_proxy_type = 'i2p' - # for each instance sending_start_time = datetime.datetime.utcnow() print('Sending post to followers begins ' + sending_start_time.strftime("%Y-%m-%dT%H:%M:%SZ")) sending_ctr = 0 + + # randomize the order of sending to instances + randomized_instances = [] for follower_domain, follower_handles in grouped.items(): + randomized_instances.append([follower_domain, follower_handles]) + random.shuffle(randomized_instances) + + # send out to each instance + for group_send in randomized_instances: + follower_domain = group_send[0] + follower_handles = group_send[1] print('Sending post to followers progress ' + str(int(sending_ctr * 100 / len(grouped.items()))) + '% ' + follower_domain)