You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When liking a post created by an anonymous user, a 500 error is thrown.
The problem is that the workaround to make other notifications work causes $post->user to return an instance of AnonymousUser. The likes extension usually checks that relationship to decide whether to send a notification. Since it's truthy, it proceeds but fails since it's not a real user.
The intended behaviour would be for no notifications to be sent. The ideal behaviour would be to send the notification to the original anonymous author.
This issue is a WONTFIX unless someone sponsors it. I estimate 30min to 1h of work is required, as it requires re-testing all the notifications that should be supported.
I ended up unintentionally fixing this while improving the error handling, so here we go...
1.0.1 just makes the error go away. Anonymous authors still won't get notifications about likes to their anonymous posts. That would require additional code specially for this.
When liking a post created by an anonymous user, a 500 error is thrown.
The problem is that the workaround to make other notifications work causes
$post->user
to return an instance ofAnonymousUser
. The likes extension usually checks that relationship to decide whether to send a notification. Since it's truthy, it proceeds but fails since it's not a real user.flarum-ext-anonymous-posting/src/Provider/FakeUserRelationServiceProvider.php
Line 19 in 6f9a854
The intended behaviour would be for no notifications to be sent. The ideal behaviour would be to send the notification to the original anonymous author.
This issue is a WONTFIX unless someone sponsors it. I estimate 30min to 1h of work is required, as it requires re-testing all the notifications that should be supported.
The text was updated successfully, but these errors were encountered: