diff --git a/lib/trust_level_repo.rb b/lib/trust_level_repo.rb index 4498728b1022772b5341b466c077b10ef1ea835d..8935ad0d19cf6593e87a92555b3d68b0f35f2d5b 100644 --- a/lib/trust_level_repo.rb +++ b/lib/trust_level_repo.rb @@ -49,11 +49,14 @@ class TrustLevelRepo body = stanza.body.to_s return if body =~ /^$|http|code/i + LOG.info("maybe incoming message: #{from.inspect}") + redis.sismember("jmp_blocked_activation_source", from).then { |blocked| next if blocked + LOG.info("write incoming message: #{customer.customer_id}") redis.set( - "jmp_customer_activater-#{customer.customer_id}", stanza.from.node, "NX" + "jmp_customer_activater-#{customer.customer_id}", from, "NX" ) }.catch { |e| LOG.error "incoming_message", e } end