diff options
author | Ashelyn Rose <git@ashen.earth> | 2024-10-06 17:17:35 -0600 |
---|---|---|
committer | Ashelyn Rose <git@ashen.earth> | 2024-10-06 17:17:35 -0600 |
commit | 4ceb1c233d48bc537a8d2aaad129abbf71d8ff81 (patch) | |
tree | 88485339cad76024c03d57a09cc00b94ba355482 /src/system/message_parser.rs | |
parent | ec104a719f46d6812661c29355e7a9fea8418b49 (diff) |
Fetches target message from API when not in cache
Diffstat (limited to 'src/system/message_parser.rs')
-rw-r--r-- | src/system/message_parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/system/message_parser.rs b/src/system/message_parser.rs index d161483..b044f61 100644 --- a/src/system/message_parser.rs +++ b/src/system/message_parser.rs @@ -39,7 +39,7 @@ static CORRECTION_REGEX: LazyLock<Regex> = LazyLock::new(|| { }); impl MessageParser { - pub fn parse(message: &FullMessage, secondary_message: Option<FullMessage>, system_config: &System, latch_state: Option<(MemberId, Timestamp)>) -> ParsedMessage { + pub fn parse(message: &FullMessage, secondary_message: Option<&FullMessage>, system_config: &System, latch_state: Option<(MemberId, Timestamp)>) -> ParsedMessage { if message.content == r"\\" { return ParsedMessage::LatchClear(if let Some((member_id, _)) = latch_state { member_id @@ -76,7 +76,7 @@ impl MessageParser { ParsedMessage::UnproxiedMessage } - fn parse_command(message: &FullMessage, secondary_message: Option<FullMessage>, system_config: &System, latch_state: Option<(MemberId, Timestamp)>) -> Command { + fn parse_command(message: &FullMessage, secondary_message: Option<&FullMessage>, system_config: &System, latch_state: Option<(MemberId, Timestamp)>) -> Command { let mut words = message.content.strip_prefix("!").unwrap().split_whitespace(); let first_word = words.next(); @@ -145,7 +145,7 @@ impl MessageParser { Command::UnknownCommand } - fn check_correction(message: &FullMessage, secondary_message: Option<FullMessage>) -> Option<ParsedMessage> { + fn check_correction(message: &FullMessage, secondary_message: Option<&FullMessage>) -> Option<ParsedMessage> { None } |