aboutsummaryrefslogtreecommitdiff
path: root/client-native-lib
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-12-11 20:58:30 +0100
committermetamuffin <metamuffin@disroot.org>2022-12-11 20:58:30 +0100
commit86ae7283820e0f12d6d40d68d272b1593c2239e8 (patch)
treec2d97b06b730ba86faaf5b6f8ca19258a52b7742 /client-native-lib
parent43bd492ffe61dfec82c172f3eeda869809aa0932 (diff)
downloadkeks-meet-86ae7283820e0f12d6d40d68d272b1593c2239e8.tar
keks-meet-86ae7283820e0f12d6d40d68d272b1593c2239e8.tar.bz2
keks-meet-86ae7283820e0f12d6d40d68d272b1593c2239e8.tar.zst
chat (nattive gui)
Diffstat (limited to 'client-native-lib')
-rw-r--r--client-native-lib/src/instance.rs6
-rw-r--r--client-native-lib/src/peer.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/client-native-lib/src/instance.rs b/client-native-lib/src/instance.rs
index 3edf50a..324c4af 100644
--- a/client-native-lib/src/instance.rs
+++ b/client-native-lib/src/instance.rs
@@ -120,14 +120,14 @@ impl Instance {
}
}
- pub async fn send_relay(&self, recipient: usize, inner: RelayMessage) {
- debug!("(relay) -> ({recipient}) {inner:?}");
+ pub async fn send_relay(&self, recipient: Option<usize>, inner: RelayMessage) {
+ debug!("(relay) -> ({recipient:?}) {inner:?}");
self.conn
.send
.write()
.await
.send(ServerboundPacket::Relay {
- recipient: Some(recipient),
+ recipient,
message: self.key.encrypt(
&serde_json::to_string(&RelayMessageWrapper {
sender: self.my_id.read().await.expect("not ready to relay yet.."),
diff --git a/client-native-lib/src/peer.rs b/client-native-lib/src/peer.rs
index b271318..b3b4dd4 100644
--- a/client-native-lib/src/peer.rs
+++ b/client-native-lib/src/peer.rs
@@ -177,7 +177,7 @@ impl Peer {
}
pub async fn send_relay(&self, inner: RelayMessage) {
- self.inst.send_relay(self.id, inner).await
+ self.inst.send_relay(Some(self.id), inner).await
}
pub async fn on_relay(self: &Arc<Self>, p: RelayMessage) {