meshtastic 0.0.113 → 0.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/meshtastic/mqtt.rb +8 -3
- data/lib/meshtastic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34eef8b231322cca365191e89c50ef9b10a77d8456ae2e390b86e41b72611d3f
|
4
|
+
data.tar.gz: e1e2dc348d689525ba523dd68f0e333a4f3aae60c83d8413b9f04ab70b8cba62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 138fb6597e450a6f7d8818040d329093c259bb598d06679588d26c520b3cc1c64ebc6fab0e1c6ebe85c89d78e2ce8651cbb5be349708e014fce693ce9cf2b1fa
|
7
|
+
data.tar.gz: f7b9b40377b8829b0be90f7278bdf00086ca715a80d6e19b20ff8275a37cedcbe2e1a5436cea15d5fcdb0592c2a1681ce046bedbf79f39ad724b09046377f9db
|
data/lib/meshtastic/mqtt.rb
CHANGED
@@ -134,6 +134,11 @@ module Meshtastic
|
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
|
+
if message.keys.include?(:public_key)
|
138
|
+
raw_public_key = message[:public_key]
|
139
|
+
message[:public_key] = Base64.strict_encode64(raw_public_key)
|
140
|
+
end
|
141
|
+
|
137
142
|
# If encrypted_message is not nil, then decrypt
|
138
143
|
# the message prior to decoding.
|
139
144
|
encrypted_message = message[:encrypted]
|
@@ -204,12 +209,12 @@ module Meshtastic
|
|
204
209
|
if message.is_a?(Hash)
|
205
210
|
flat_message = message.values.join(' ')
|
206
211
|
|
207
|
-
disp = false if exclude_arr.first == message[:id] ||
|
208
|
-
exclude_arr.all? { |exclude| flat_message.include?(exclude) }
|
209
|
-
|
210
212
|
disp = true if filter_arr.first == message[:id] ||
|
211
213
|
filter_arr.all? { |filter| flat_message.include?(filter) }
|
212
214
|
|
215
|
+
disp = false if exclude_arr.first == message[:id] ||
|
216
|
+
exclude_arr.all? { |exclude| flat_message.include?(exclude) }
|
217
|
+
|
213
218
|
if disp
|
214
219
|
if block_given?
|
215
220
|
yield decoded_payload_hash
|
data/lib/meshtastic/version.rb
CHANGED