diff --git a/src/groups/calls/commands.rs b/src/groups/calls/commands.rs index 0f7e908..63e6fa0 100644 --- a/src/groups/calls/commands.rs +++ b/src/groups/calls/commands.rs @@ -271,7 +271,7 @@ impl Command for HangupCommand { ctx: CommandContext<'_, State, Extras>, _args: &str, ) -> Result<(), CommandError> { - let Some(channel) = Channel::get_by_id(ctx.event.channel_id.get(), &ctx.rt.state.db) + let Some(mut channel) = Channel::get_by_id(ctx.event.channel_id.get(), &ctx.rt.state.db) .await .inspect_err(|e| log::error!("Failed to get channel: {e:?}"))? else { @@ -305,7 +305,10 @@ impl Command for HangupCommand { .await .inspect_err(|e| log::error!("Failed to get call: {e:?}"))? else { - ctx.send().content("❌ Call not found.").await?; + ctx.send().content("❌ The call could not be found.\n-# This is not supposed to happen. If the issue persists, contact a moderator in the official server.").await?; + + channel.call_id = None; + channel.upsert(&ctx.rt.state.db).await?; return Err(CommandError::DatabaseInconsistentState); };