Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

revolt.js

Package Overview
Dependencies
Maintainers
1
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

revolt.js - npm Package Compare versions

Comparing version 6.0.19 to 6.0.20

1

dist/Client.d.ts

@@ -234,2 +234,3 @@ import EventEmitter from "eventemitter3";

} | null | undefined;
server_flags?: number | null | undefined;
channel_id: string;

@@ -236,0 +237,0 @@ channel_name: string;

@@ -212,2 +212,5 @@ import type { DataEditMessage, DataMessageSend, Embed, Interactions, Masquerade, Message as MessageI, SystemMessage } from "revolt-api";

id: string;
} | {
type: "Streamable";
id: string;
} | null | undefined;

@@ -214,0 +217,0 @@ title?: string | null | undefined;

@@ -426,2 +426,47 @@ "use strict";

}
case "UserPlatformWipe": {
(0, mobx_1.runInAction)(() => {
var _a;
const user_id = packet.user_id;
(_a = this.client.users.get(user_id)) === null || _a === void 0 ? void 0 : _a.update({
username: "Removed User",
online: false,
relationship: "None",
flags: packet.flags,
}, [
"Avatar",
"ProfileBackground",
"ProfileContent",
"StatusPresence",
"StatusText",
]);
const dm_channel = [
...this.client.channels.values(),
].find((channel) => {
var _a;
return channel.channel_type ===
"DirectMessage" &&
((_a = channel.recipient_ids) === null || _a === void 0 ? void 0 : _a.includes(user_id));
});
if (dm_channel) {
this.client.channels.delete(dm_channel._id);
}
const member_ids = [
...this.client.members.values(),
]
.filter((member) => member._id.user === user_id)
.map((member) => member._id);
for (const member_id of member_ids) {
this.client.members.deleteKey(member_id);
}
for (const message of [
...this.client.messages.values(),
].filter((message) => message.author_id === user_id)) {
message.content = "(message withheld)";
message.attachments = [];
message.embeds = [];
}
});
break;
}
case "UserUpdate": {

@@ -428,0 +473,0 @@ (_f = this.client.users

@@ -170,2 +170,6 @@ import type { Emoji, FieldsChannel, FieldsMember, FieldsServer, FieldsUser } from "revolt-api";

};
} | {
type: "UserPlatformWipe";
user_id: string;
flags: number;
} | ({

@@ -176,3 +180,13 @@ type: "EmojiCreate";

id: string;
};
} | ({
type: "Auth";
} & ({
event_type: "DeleteSession";
user_id: string;
session_id: string;
} | {
event_type: "DeleteAllSessions";
user_id: string;
exclude_session_id: string;
}));
export {};

@@ -234,2 +234,3 @@ import EventEmitter from "eventemitter3";

} | null | undefined;
server_flags?: number | null | undefined;
channel_id: string;

@@ -236,0 +237,0 @@ channel_name: string;

@@ -212,2 +212,5 @@ import type { DataEditMessage, DataMessageSend, Embed, Interactions, Masquerade, Message as MessageI, SystemMessage } from "revolt-api";

id: string;
} | {
type: "Streamable";
id: string;
} | null | undefined;

@@ -214,0 +217,0 @@ title?: string | null | undefined;

@@ -420,2 +420,47 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
case "UserPlatformWipe": {
runInAction(() => {
var _a;
const user_id = packet.user_id;
(_a = this.client.users.get(user_id)) === null || _a === void 0 ? void 0 : _a.update({
username: "Removed User",
online: false,
relationship: "None",
flags: packet.flags,
}, [
"Avatar",
"ProfileBackground",
"ProfileContent",
"StatusPresence",
"StatusText",
]);
const dm_channel = [
...this.client.channels.values(),
].find((channel) => {
var _a;
return channel.channel_type ===
"DirectMessage" &&
((_a = channel.recipient_ids) === null || _a === void 0 ? void 0 : _a.includes(user_id));
});
if (dm_channel) {
this.client.channels.delete(dm_channel._id);
}
const member_ids = [
...this.client.members.values(),
]
.filter((member) => member._id.user === user_id)
.map((member) => member._id);
for (const member_id of member_ids) {
this.client.members.deleteKey(member_id);
}
for (const message of [
...this.client.messages.values(),
].filter((message) => message.author_id === user_id)) {
message.content = "(message withheld)";
message.attachments = [];
message.embeds = [];
}
});
break;
}
case "UserUpdate": {

@@ -422,0 +467,0 @@ (_f = this.client.users

@@ -170,2 +170,6 @@ import type { Emoji, FieldsChannel, FieldsMember, FieldsServer, FieldsUser } from "revolt-api";

};
} | {
type: "UserPlatformWipe";
user_id: string;
flags: number;
} | ({

@@ -176,3 +180,13 @@ type: "EmojiCreate";

id: string;
};
} | ({
type: "Auth";
} & ({
event_type: "DeleteSession";
user_id: string;
session_id: string;
} | {
event_type: "DeleteAllSessions";
user_id: string;
exclude_session_id: string;
}));
export {};

4

package.json
{
"name": "revolt.js",
"version": "6.0.19",
"version": "6.0.20",
"main": "dist/index.js",

@@ -20,3 +20,3 @@ "typings": "dist/index.d.ts",

"mobx": "^6.3.2",
"revolt-api": "0.5.5-5",
"revolt-api": "0.5.7",
"ulid": "^2.3.0",

@@ -23,0 +23,0 @@ "ws": "^8.2.2"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc