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