feat(plugin): sort friend requests by date received (#280)

This commit is contained in:
megumin 2022-12-08 22:53:12 +00:00 committed by GitHub
parent 022bf17140
commit ee24439795
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 80 additions and 1 deletions

View file

@ -52,7 +52,10 @@ export let UserStore: Stores.UserStore;
export let SelectedChannelStore: Stores.SelectedChannelStore;
export let SelectedGuildStore: any;
export let ChannelStore: Stores.ChannelStore;
export let RelationshipStore: Stores.RelationshipStore;
export let RelationshipStore: Stores.RelationshipStore & {
/** Get the date (as a string) that the relationship was created */
getSince(userId: string): string;
};
export const Forms = {} as {
FormTitle: Components.FormTitle;

View file

@ -137,6 +137,7 @@ function patchPush() {
// @ts-ignore we change all patch.replacement to array in plugins/index
for (const replacement of patch.replacement) {
if (replacement.predicate && !replacement.predicate()) continue;
const lastMod = mod;
const lastCode = code;