Skip to content

Commit

Permalink
server: remove static props which are currently unused
Browse files Browse the repository at this point in the history
  • Loading branch information
brunnre8 committed Apr 1, 2024
1 parent feaf10a commit 8e13872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/models/chan.ts
Expand Up @@ -38,7 +38,6 @@ class Chan {
data?: any;
closed?: boolean;
num_users?: number;
static optionalProperties = ["userAway", "special", "data", "closed", "num_users"];

constructor(attr?: Partial<Chan>) {
_.defaults(this, attr, {
Expand Down Expand Up @@ -232,6 +231,7 @@ class Chan {
num_users: this.num_users,
};
// TODO: funny array mutation below might need to be reproduced
// static optionalProperties = ["userAway", "special", "data", "closed", "num_users"];
// return Object.keys(this).reduce((newChannel, prop) => {
// if (Chan.optionalProperties.includes(prop)) {
// if (this[prop] !== undefined || (Array.isArray(this[prop]) && this[prop].length)) {
Expand Down

0 comments on commit 8e13872

Please sign in to comment.