-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error on local user replies to local users #655
Conversation
Could you also check on line (notice the OR and not AND): mbin/src/Service/ActivityPubManager.php Line 167 in 57a816d
|
This method is really difficult to read... I think by this point mbin/src/Service/ActivityPubManager.php Lines 145 to 148 in 823c83c
that checks if the user is local and if so, return, meaning anything after it knows the user isn't local so mbin/src/Service/ActivityPubManager.php Line 167 in 823c83c
is fine because it fires off if the user hasn't been fetched at all or not recently, and we know they have an but above all those checks where this was happening I don't think we know whether the user is local or remote yet. I am assuming calling mbin/src/Service/ActivityPubManager.php Line 135 in 823c83c
|
I think you're right that it should have the same check for having never been fetched, at the very least to match the way it's done later. Assuming my reading of the code was correct, which is highly possibly not, the only difference here is we don't know if it's a local or remote user returned yet, but later we do so don't need the check... I could really use some comments on figuring out what this method is doing. Like I think I understand the, if actor url is local, lookup local user and return. Next it does the remote check and updates if necessary. But what is this one I'm change the line in. What is it even for? It also looks up the user. Why was it needed compared to the two below it. There's three different |
It now matches more closely to mbin/src/Service/ActivityPubManager.php Lines 666 to 668 in 823c83c
|
There are 3
|
Nevermind on the remove part. |
When fetching the AP for a local user replying to a local user, a 500 was being thrown:
this line
mbin/src/Service/ActivityPubManager.php
Line 134 in 823c83c
was being run on local users, and
modify()
was throwing an error whenapFetchedAt
was null. this check makes it only emit the dispatch if the user is remoteI'm not sure if I should instead check
isset($user->apFetchedAt)
, I went with the usual sentinel value for whether a user is remote or not instead, since we also accessapProfileId