DEV: Deprecate show_in_ui argument of the register_stat API (#28727)

We need to start printing deprecation notices when the `show_in_ui` argument is used because it works only for the old about page which will be removed soon. For the new about page, we've introduced a new API `addAboutPageActivity` which is more flexible than a true/false argument on the server side.

Internal topic: t/136551.
This commit is contained in:
Osama Sayegh
2024-09-04 19:58:14 +03:00
committed by GitHub
parent e6edd52047
commit a23773f83d
7 changed files with 63 additions and 29 deletions

View File

@ -500,9 +500,7 @@ after_initialize do
register_email_unsubscriber("chat_summary", EmailControllerHelper::ChatSummaryUnsubscriber)
register_stat("chat_messages", show_in_ui: true, expose_via_api: true) do
Chat::Statistics.about_messages
end
register_stat("chat_messages", expose_via_api: true) { Chat::Statistics.about_messages }
register_stat("chat_users", expose_via_api: true) { Chat::Statistics.about_users }
register_stat("chat_channels", expose_via_api: true) { Chat::Statistics.about_channels }