mirror of
https://github.com/mii443/ncb-tts-r2.git
synced 2025-08-22 16:15:29 +00:00
fix voice move state bug
This commit is contained in:
@ -14,6 +14,6 @@ RUN cargo build --release
|
||||
|
||||
FROM ubuntu:22.04 AS runtime
|
||||
WORKDIR /ncb-tts-r2
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates ffmpeg libssl-dev libopus-dev && apt-get -y clean && mkdir audio
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates ffmpeg libssl-dev libopus-dev && apt-get -y clean
|
||||
COPY --from=builder /app/target/release/ncb-tts-r2 /usr/local/bin
|
||||
ENTRYPOINT ["/usr/local/bin/ncb-tts-r2"]
|
||||
|
@ -29,12 +29,10 @@ impl VoiceMoveStateTrait for VoiceState {
|
||||
(Some(old_channel_id), Some(new_channel_id)) => {
|
||||
if old_channel_id == new_channel_id {
|
||||
VoiceMoveState::NONE
|
||||
} else if old_channel_id != new_channel_id {
|
||||
if target_channel == new_channel_id {
|
||||
VoiceMoveState::JOIN
|
||||
} else {
|
||||
VoiceMoveState::NONE
|
||||
}
|
||||
} else if old_channel_id == target_channel {
|
||||
VoiceMoveState::LEAVE
|
||||
} else if new_channel_id == target_channel {
|
||||
VoiceMoveState::JOIN
|
||||
} else {
|
||||
VoiceMoveState::NONE
|
||||
}
|
||||
|
Reference in New Issue
Block a user