Hi,
I unshared a message that I had accidentally shared.
Although it was effectively unshared on my profile, it was still present
on federated instances.
I found no errors in logs, but the list of recipients was empty (unlike
the list of recipients in the "Announce" activity):
2022-11-25 21:23:23.044 | INFO | app.main:__call__:168 |
2c6af0f7f96af82e - xxx.xxx.xxx.xxx:0 - POST
https://xxx.xxx.xxx.xxx:8000/admin/actions/undo - "Mozilla/5.0 (Android
10; Mobile; rv:105.0) Gecko/105.0 Firefox/105.0"
2022-11-25 21:23:23.160 | INFO | app.boxes:_compute_recipients:891 |
2c6af0f7f96af82e - []
INFO: xxx.xxx.xxx.xxx:0 - "POST /admin/actions/undo HTTP/1.0" 302
Found
Recipients were retrieved directly from the "Undo" activity
(outbox_object) instead of the "Announce" activity.
Sam (1):
fix unshare by getting recipients from Announce activity instead of
Undo
app/boxes.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.34.5
Hey, I believe this change introduced another issue: now "unshare" events
are sent to followers of author of the _original_ post - while I believe
they should be sent to _my_ followers (but please correct me if I'm wrong
here).
What I saw was:
When I tried to share and (immediately) unshare a post by a popular user
(see, for example, latest post shared by https://microblog.pub/), I got a
server error.
data/uvicorn.log file shows that microblog.pub tried to fetch all
followers of the author of original post (in this case it was
https://social.wake.st/@liaizon with 3.7k followers), and after it fetched
300 pages(!!) from remote server - they responded with '429 Too Many
Requests'.
This doesn't look right :)
I think if we didn't preserve list of people who received original
"announce" event - then the best we can do is to send the "undo announce"
event to all our _current_ followers.
Oops, that's a good catch, I just pushed a fix.
It should re-use the recipients on the `Announce`: https://git.sr.ht/~tsileo/microblog.pub/commit/34c7cdb5fb9c5b681f91fd52c6323bb22c46a4ad
Thanks!
Hi,
sorry for the bug, I was just about to push a fix.
thanks for the patch.
------- Original Message -------
~tsileo: Thanks for the quick fix, as always!
~samr1: No problem, happens to all of us!