首日主题数达上限错误,首个主题创建4天后出现

错误消息是:

您已达到新用户在第一天可以创建的主题数量上限。请等待 2 小时后再输入。

这似乎是由“第一天最大主题数”控制的——调整此设置消除了错误。

问题是,该用户有 8 个先前的主题,第一个是 4 天前。所以我认为他们不应该受到此设置的影响,因为它的目的是仅影响用户第一帖后的 24 小时。发帖账户是 TL0 用户。

选项描述是:

用户在创建第一帖后的 24 小时内允许创建的最大主题数

我猜测该设置可能实际上是“TL0 用户每天最大发帖数”。

值得检查“第一天最大回复数”设置是否也是如此。

Yes, the code seems to be checking to see if a user is TL0 - not checking that it’s the user’s first 24 hours on the site. If that’s the case, possibly the message that is displayed to the user should be changed. The default requirements for achieving TL1 are fairly low though. I’d expect that considering TL0 users to be new users is correct for most cases.

1 个赞

@simon Yeah, I’m experimenting with adjusting the difficulty for users to achieve TL1+.

If the functionality of these settings are kept the same (and assuming it is the same case for max replies in first day), I think it could be good to rename them to be consistent with the other ‘newuser’ settings. As well as update the message to users as you mentioned and the setting descriptions.

E.g.
max topics in first day -> newuser max topics per day
max replies in first day -> newuser max replies per day

这是否仍然不符合要求? 这段代码
在我看来是错误的,检查用户的第一篇帖子是否超过一天了?

 def new_user_posting_on_first_day?
    !staff? && trust_level < TrustLevel[2] &&
      (
        trust_level == TrustLevel[0] || self.first_post_created_at.nil? ||
          self.first_post_created_at >= 24.hours.ago
      )
  end

好的,这个有点棘手,但我认为这可以解决问题:

基本上,我们几年前改变了 new_user_posting_on_first_day? 的意图,使其与描述和错误不符。这恢复了旧的行为,并且在本次检查的目的下,不会一直将 TL0 用户视为新用户。

3 个赞