Fix update_one failing on sys message.

This commit is contained in:
Paul
2021-04-03 21:37:24 +01:00
parent a547177325
commit 2050a0609f

View File

@@ -119,6 +119,7 @@ impl Message {
})?;
}
Channel::Group { id, .. } => {
if let Content::Text(_) = &self.content {
channels
.update_one(
doc! { "_id": id },
@@ -133,6 +134,7 @@ impl Message {
with: "channel",
})?;
}
}
_ => {}
}
@@ -140,7 +142,7 @@ impl Message {
ClientboundNotification::Message(self)
.publish(channel.id().to_string())
.await
.ok();
.unwrap();
/*
Web Push Test Code