FIX: first post true if user creates topic first (PR #8139)

Reported here: https://meta.discourse.org/t/user-was-banned-for-posting-a-reply-within-3-seconds/128823/12 The problem here is the user could create a topic, then reply and get silenced on the second time (though technically their first post) for being below the min_first_post_typing_time threshold.

GitHub

You’ve signed the CLA, justindirose. Thank you! This pull request is ready for review.

This looks good @justindirose but you should add a test for it. Let me know if you need help doing so!

Ah yes thanks @eviltrout – I’m learning when it’s best to add tests. I’ll check it out!

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/user-was-banned-for-posting-a-reply-within-3-seconds/128823/12

Test is now added!

Looks good to me too.

Thanks @justindirose

It seems so strange to me to not count a topic as a post, but I’m sure it makes sense internally (or at least to count them separately). Thanks for fixing up the first-post condition to take into account topics as well! I think it will prevent many false positives with the auto-silencing based on typing speed.