Modify responses and add a struct for future room-specific configs

This commit is contained in:
0xf8 2023-04-15 21:50:17 -04:00
parent 62473dea60
commit 45b4099c1f
Signed by: 0xf8
GPG Key ID: 446580D758689584
2 changed files with 10 additions and 2 deletions

View File

@ -11,8 +11,8 @@
"Ok": null, "Ok": null,
"MaybeScam": null, "MaybeScam": null,
"LikelyScam": { "LikelyScam": {
"plain": "Warning! This message is likely to be a scam, seeking to lure you in and steal your money! Please visit these resources for more information:\n- https://www.sec.gov/oiea/investor-alerts-and-bulletins/digital-asset-and-crypto-investment-scams-investor-alert \n [!mods !modhelp]", "plain": "Warning! This message is likely to be a scam, seeking to lure you in and steal your money! Please visit these resources for more information:\n- https://www.sec.gov/oiea/investor-alerts-and-bulletins/digital-asset-and-crypto-investment-scams-investor-alert\n- https://www.youtube.com/watch?v=gFWaA7mt9oM \n [!mods !modhelp]",
"html": "Warning! This message is likely to be a <b>scam</b>, seeking to lure you in and steal your money! Please visit these resources for more information: <ul><li><a href=\"https://www.sec.gov/oiea/investor-alerts-and-bulletins/digital-asset-and-crypto-investment-scams-investor-alert\">https://www.sec.gov/oiea/investor-alerts-and-bulletins/digital-asset-and-crypto-investment-scams-investor-alert</a></li></ul> [!mods !modhelp]" "html": "Warning! This message is likely to be a <b>scam</b>, seeking to lure you in and steal your money! Please visit these resources for more information: <ul><li><a href=\"https://www.sec.gov/oiea/investor-alerts-and-bulletins/digital-asset-and-crypto-investment-scams-investor-alert\">https://www.sec.gov/oiea/investor-alerts-and-bulletins/digital-asset-and-crypto-investment-scams-investor-alert</a></li><li><a href=\"https://www.youtube.com/watch?v=gFWaA7mt9oM\">https://www.youtube.com/watch?v=gFWaA7mt9oM</a></li></ul> [!mods !modhelp]"
} }
} }
} }

View File

@ -1,5 +1,13 @@
use serde_json::Value; use serde_json::Value;
use matrix_sdk::ruma::OwnedRoomId;
#[derive(Debug)]
pub struct RoomConfig {
pub id: OwnedRoomId,
pub no_reply: bool,
}
#[derive(Debug)]
pub struct Config { pub struct Config {
pub keywords: Value, pub keywords: Value,
pub responses: Value, pub responses: Value,