Skip to content

Commit f266c80

Browse files
authored
add percentage of those having declared a mastodon or xmpp account
1 parent adeaed5 commit f266c80

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/models/statistics/users.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ class Statistics::Users < Statistics::Statistics
44
def pctrecent(value)
55
"%.0f%%" % (100.0 * value / nb_recently_seen_accounts)
66
end
7-
7+
8+
def pctrecent_filled(value,field)
9+
# take into account those having declared an xmpp or mastodon account
10+
"%.0f%%" % (100.0 * value / filled(field))
11+
end
12+
813
def nb_users
914
count "SELECT COUNT(*) AS cnt FROM users"
1015
end

0 commit comments

Comments
 (0)