This commit is contained in:
2026-03-04 15:47:38 -08:00
commit 781b4d19d4
9 changed files with 311 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
using Newtonsoft.Json.Linq;
public class LocalConfig
{
public static string authToken
{
get
{
if (string.IsNullOrEmpty(_authToken))
{
JObject localSecrets = JObject.Parse(File.ReadAllText("localSecrets.json"));
_authToken = (string) ((JObject) localSecrets["matrix"])["auth_token"];
}
return _authToken;
}
}
private static string _authToken;
public static string homeserver
{
get
{
if (string.IsNullOrEmpty(_homeserver))
{
JObject localSecrets = JObject.Parse(File.ReadAllText("localSecrets.json"));
_homeserver = (string) ((JObject) localSecrets["matrix"])["homeserver"];
}
return _homeserver;
}
}
private static string _homeserver;
}