Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing group message from other devices #251

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use presage::prelude::{
};
use regex_automata::Regex;
use tokio::sync::mpsc;
use tracing::{error, info, warn};
use tracing::{error, info, trace, warn};
use uuid::Uuid;

use std::borrow::Cow;
Expand Down Expand Up @@ -496,7 +496,7 @@ impl App {
message:
Some(DataMessage {
mut body,
profile_key: Some(profile_key),
profile_key,
group_v2,
quote,
attachments: attachment_pointers,
Expand Down Expand Up @@ -524,6 +524,7 @@ impl App {
.context("failed to create group channel")?
} else if let Some(destination_uuid) = destination_uuid {
let profile_key = profile_key
.context("sync message with destination without profile key")?
.try_into()
.map_err(|_| anyhow!("invalid profile key"))?;
let destination_uuid = Uuid::parse_str(&destination_uuid).unwrap();
Expand Down Expand Up @@ -795,7 +796,10 @@ impl App {
return Ok(());
}

_ => return Ok(()),
unhandled => {
trace!(?unhandled, "skipping unhandled message");
return Ok(());
}
};

self.add_message_to_channel(channel_idx, message);
Expand Down