feat: switch to revolt.js@6.0.0 + new revolt-api

This commit is contained in:
Paul Makles
2022-04-09 15:47:04 +01:00
parent e9585a66a8
commit 48ff1dcf92
91 changed files with 528 additions and 460 deletions

View File

@@ -1,5 +1,4 @@
import { action, computed, makeAutoObservable, ObservableMap } from "mobx";
import { Presence, RelationshipStatus } from "revolt-api/types/Users";
import { Channel } from "revolt.js/dist/maps/Channels";
import { Message } from "revolt.js/dist/maps/Messages";
import { Server } from "revolt.js/dist/maps/Servers";
@@ -113,7 +112,7 @@ export default class NotificationOptions
*/
shouldNotify(message: Message) {
// Make sure the author is not blocked.
if (message.author?.relationship === RelationshipStatus.Blocked) {
if (message.author?.relationship === "Blocked") {
return false;
}
@@ -124,7 +123,7 @@ export default class NotificationOptions
}
// Check whether we are busy.
if (user.status?.presence === Presence.Busy) {
if (user.status?.presence === "Busy") {
return false;
}