mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
feat: chat filters cover bios
The server refuses a bio that breaks its filter and hides one saved before. The client filter now runs on your own card too.
This commit is contained in:
1 parent
89fe4d2a28
commit
80383e8dec
7 files changed
+22
-9
No files matched your search
+5
-2
@@ -966,14 +966,17 @@ const playedText = seconds => {
|
||||
return `Played ${minutes} minute${minutes === 1 ? "" : "s"}`;
|
||||
};
|
||||
const cardBio = account => {
|
||||
// a bio from before the chat filter, or one a newer rule catches, is not
|
||||
// shown (lib/chat-filter.txt).
|
||||
const bio = account.bio && !chatFilter.broken(account.bio) ? account.bio : "";
|
||||
if (!account.playtimePublic) {
|
||||
return account.bio;
|
||||
return bio;
|
||||
}
|
||||
const session = online.get(account.username.toLowerCase());
|
||||
if (session) {
|
||||
countPlaytime(session);
|
||||
}
|
||||
return account.bio ? `${playedText(account.playtime)}\n\n${account.bio}` : playedText(account.playtime);
|
||||
return bio ? `${playedText(account.playtime)}\n\n${bio}` : playedText(account.playtime);
|
||||
};
|
||||
|
||||
// the time since it was last counted, added to the account's playtime.
|
||||
|
||||
Reference in new issue
Block a user