<p></p>
<blockquote>
<p>(BTW, codewise, isn't the variable <code>updated_at</code> is a bit of a misnomer? It appears to be unrelated to the <code>update</code> function of a block, which appears to influence the <code>ends_at</code> time. Thus easier to understand would be <code>read_at</code>)</p>
</blockquote>
<p>I've been looking at this today, and I think there's a few oddities with the user blocks. For example, the <code>updated_at</code> is indeed a rails thing, so as well as updating the model when it is viewed by the recipient, it's also updated if the block is ever edited e.g. by a moderator editing the block_reason at any point. So I think it's unwise to rely on that, and I think we should move to having a <code>viewed_at</code> or <code>acknowledged_at</code>, and only update that when it's the user viewing it, rather than (potentially) side effects of other things. At the moment it (just about) works, since moderators can't edit the block after it has finished, and the <code>show</code> method implicitly relies on rails' "dirty" handling to avoid updating it each time it's viewed - but still <g-emoji class="g-emoji" alias="frowning_face" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2639.png">☹️</g-emoji></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3143#issuecomment-828521259">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLINEJEPGHIFKPWGJRDTLAONBANCNFSM4ZSC6SHQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLLHDMVBX42JRD33S6TTLAONBA5CNFSM4ZSC6SH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGFRDWKY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/3143#issuecomment-828521259",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3143#issuecomment-828521259",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>