Disable auto call hangup and check for DB inconsistency in call channels
This commit is contained in:
@@ -220,6 +220,17 @@ impl OnMessageHandler<State, Extras> for CallMessageHandler {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
if opposite_channel.call_id != Some(call.id) {
|
||||
log::error!(
|
||||
"Channel {} is listed as the opposite channel of channel {} in call {}, but its call ID is {}.",
|
||||
opposite_channel.id,
|
||||
channel.id,
|
||||
call.id,
|
||||
opposite_channel.call_id.map_or("None".into(), |i| i.to_string())
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let Some((webhook_id, webhook_token)) = opposite_channel
|
||||
.webhook_id
|
||||
.zip(opposite_channel.webhook_token.clone())
|
||||
|
||||
+1
-1
@@ -308,7 +308,7 @@ async fn start(
|
||||
.cache_resource_type(ResourceType::CHANNEL)
|
||||
.cache_resource_type(ResourceType::MEMBER)
|
||||
.cache_resource_type(ResourceType::ROLE)
|
||||
.task(EndInactiveCallsTask::new(shard.number(), shard.total()))
|
||||
// .task(EndInactiveCallsTask::new(shard.number(), shard.total()))
|
||||
.on_ready(ReadyHandler)
|
||||
.on_reconnect(ReconnectHandler)
|
||||
.on_message(CallMessageHandler)
|
||||
|
||||
Reference in New Issue
Block a user