refactor: extend channel to carry voice note bytes

This commit is contained in:
Lewis Wynne 2026-04-10 02:17:05 +01:00
parent d66e004b0d
commit 54764935c2
3 changed files with 6 additions and 6 deletions

View file

@ -18,8 +18,8 @@ async fn notify(bot: &Bot, chat_id: ChatId, entry: &Entry) {
}
/// Listen for new entries on the channel and send Telegram notifications.
pub async fn notification_task(bot: Bot, chat_id: ChatId, mut rx: Receiver<(Entry, Option<Vec<u8>>)>) {
while let Some((entry, drawing_bytes)) = rx.recv().await {
pub async fn notification_task(bot: Bot, chat_id: ChatId, mut rx: Receiver<(Entry, Option<Vec<u8>>, Option<Vec<u8>>)>) {
while let Some((entry, drawing_bytes, _voice_bytes)) = rx.recv().await {
notify(&bot, chat_id, &entry).await;
if let Some(bytes) = drawing_bytes {
if let Err(e) = bot.send_photo(