aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreta <hi@theta.eu.org>2019-11-08 21:40:45 +0000
committereta <hi@theta.eu.org>2019-11-08 21:40:45 +0000
commite45a80106db896a093dbb1929ef1619746175da3 (patch)
treea0418d2bdacab54df15a228aa5faded408c29f65
parent7e12390c66ac84694858d214fea327caeb7ce90f (diff)
downloadsms-irc-e45a80106db896a093dbb1929ef1619746175da3.tar.gz
sms-irc-e45a80106db896a093dbb1929ef1619746175da3.tar.bz2
sms-irc-e45a80106db896a093dbb1929ef1619746175da3.zip
don't check for stubs on media messages
-rw-r--r--src/whatsapp.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/whatsapp.rs b/src/whatsapp.rs
index eb43a03..58ddcbe 100644
--- a/src/whatsapp.rs
+++ b/src/whatsapp.rs
@@ -411,8 +411,11 @@ impl WhatsappManager {
for msg in msgs {
self.store_message(&msg.from, &msg.text, msg.group, msg.ts)?;
}
+ if is_media {
+ /* none of the other fancy stuff below applies */
+ }
// If no messages are generated from the processor, say something about it.
- if num_msgs == 0 {
+ else if num_msgs == 0 {
if let Some(st) = stub_type {
warn!("Message {} has stub type {:?}", id.0, st);
// CIPHERTEXT stubs mean "I'm about to send you the real message, but I can't
@@ -432,7 +435,7 @@ impl WhatsappManager {
warn!("Message {} is empty, and isn't even a stub!", id.0);
}
}
- else if !is_media {
+ else {
self.store.store_wa_msgid(id.0.clone())?;
}
if let Some(p) = peer {