-
Notifications
You must be signed in to change notification settings - Fork 130
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
Notify also when followed tests gets approved #2124
Comments
worth mentioning that a submitter follows his own tests automatically as of now |
An issue is that the folow=1 should be a post request instead of get, it makes no sense that if I send someone a link with |
I can explain why it is that way. Normally one would want to follow a test after creating it. The problem however is that the server may reject a new run so that in that case one would be following a non-existing test. Hence the Currently I think that the problem mentioned in the first paragraph is not really serious. Following a non-existing test is pretty harmless since after 4.5 hours it will be purged. Moreover, in most cases people will edit the new run form until a valid run is created anyway. |
I will keep this issue in mind, but I am a bit hesitant to create new PRs at this time since there is already a sizable queue. I'd rather wait until the queue becomes a bit shorter. |
Actually now I remember that there is a more fundamental reason for the So the main question would be: what is a good alternative for |
Better to keep the follow hack but change it to submited_test=1 and check here
if the user is the same as the submitter, that would be the easiest. |
Or you can completely remove it and each time a user views his own test they start following it if they didn't.. and since you redirect to the test view immediately, the follow=1 is already redundant. Edit: the difference in functionality would be that if they open the test from another device |
Ine trick also so that this works on all devices is most likely thee user will open the home page which if they did we can loop with js if they have any active tests or you can pass it from python.. then you can make it work on all devices by following them on this device |
That's not a bad idea (I am not too worried about the slight difference in functionality). We would need the name of the submitter of the current test. Since that name happens to be present on the test page, the easiest thing to do seems to just inspect the DOM using javascript (which admittedly is also a bit hacky). |
Not neccessarly JS, python would be better ..each run viewed already has the submitter name and we have the authenticated_id, we can do run['args']['user'] == authenticated_id no? Edit: the variables naming is off ofc |
not an issue but nice to have. maybe can look to add at it later
The text was updated successfully, but these errors were encountered: