Skip to content

[#323] Resolve "don't count INFO commands from sysadmins"

aguestuser requested to merge 323-dont-count-info-commands-from-sysadmins into master

Closes #323 (closed)

context

  • sysadmins ping channels with INFO as an informal health checks very frequently.
  • Counting these pings as usages prevents us from easily detecting stale channels, by artificially increasing the value of messageCounts.updatedAt that we use as a proxy for last usage.

changes

  • add repositories.channel.isSysadmin: detects whether a given phone number is an admin of the support channel (and thus a sysadmin)
  • use isSysadmin to add shouldCount guard in dispatcher.messenger.respond
Edited by aguestuser

Merge request reports

Loading