mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-09-15 19:32:09 +02:00
Compare commits
4 Commits
v36.2.beta
...
176a81e055
Author | SHA1 | Date | |
---|---|---|---|
176a81e055 | |||
![]() |
1cf3e76644 | ||
33f5ab7cce
|
|||
b9a5664740
|
@@ -91,13 +91,15 @@ class DISCORD {
|
|||||||
static getMessageElementProps(ele) {
|
static getMessageElementProps(ele) {
|
||||||
const props = DOM.getReactProps(ele);
|
const props = DOM.getReactProps(ele);
|
||||||
|
|
||||||
if (props.children && props.children.length >= 4) {
|
if (props.children && props.children.length) {
|
||||||
const childProps = props.children[3].props;
|
for (let i = 3; i < props.children.length; i++) {
|
||||||
|
const childProps = props.children[i].props;
|
||||||
|
|
||||||
if ("message" in childProps && "channel" in childProps) {
|
if (childProps && "message" in childProps && "channel" in childProps) {
|
||||||
return childProps;
|
return childProps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,13 @@ using Microsoft.Extensions.Hosting;
|
|||||||
|
|
||||||
namespace DHT.Server.Service {
|
namespace DHT.Server.Service {
|
||||||
sealed class Startup {
|
sealed class Startup {
|
||||||
|
private static readonly string[] AllowedOrigins = {
|
||||||
|
"https://discord.com",
|
||||||
|
"https://ptb.discord.com",
|
||||||
|
"https://canary.discord.com",
|
||||||
|
"https://discordapp.com"
|
||||||
|
};
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services) {
|
public void ConfigureServices(IServiceCollection services) {
|
||||||
services.Configure<JsonOptions>(static options => {
|
services.Configure<JsonOptions>(static options => {
|
||||||
options.SerializerOptions.NumberHandling = JsonNumberHandling.Strict;
|
options.SerializerOptions.NumberHandling = JsonNumberHandling.Strict;
|
||||||
@@ -16,7 +23,7 @@ namespace DHT.Server.Service {
|
|||||||
|
|
||||||
services.AddCors(static cors => {
|
services.AddCors(static cors => {
|
||||||
cors.AddDefaultPolicy(static builder => {
|
cors.AddDefaultPolicy(static builder => {
|
||||||
builder.WithOrigins("https://discord.com", "https://discordapp.com").AllowCredentials().AllowAnyMethod().AllowAnyHeader();
|
builder.WithOrigins(AllowedOrigins).AllowCredentials().AllowAnyMethod().AllowAnyHeader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -7,6 +7,6 @@ using DHT.Utils;
|
|||||||
|
|
||||||
namespace DHT.Utils {
|
namespace DHT.Utils {
|
||||||
static class Version {
|
static class Version {
|
||||||
public const string Tag = "36.2.0.0";
|
public const string Tag = "37.0.0.0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user