feat: add SNR/RSSI or Hops Away metrics to the reaction dialog #3964
+843
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change adds metrics to the reaction dialog, next to the emoji which a user reacted with. The metrics include 'Hops Away' for messages that went though hops or 'SNR/RSSI' for messages received directly – this is the same behavior you see with normal messages.
Below is the reaction dialog before:


and after:
Motivation
Our mesh network uses bots for testing connectivity. When a user sends a
pingmessage to a specific channel, bots automatically reply with a message that includes 'Hops Away' or 'SNR/RSSI' values, so that the user could see which end-points received their message along with the aforementioned metrics on the way to those end-points. They can also see metrics on the way back in the message history.To reduce clutter, I made a bot that sends a reaction with hop count (e.g. 1️⃣) or signal quality (e.g. 🟨 for fair quality). This way the user can still see the metrics towards my end-point, but no additional messages visible in channel are generated. However, they cannot see metrics on the way back, although they are technically available.
This change adds those missing metrics, at a cost of storing those within the database.
This can also be useful for networks without bots, as it can provide additional insights and the behavior is consistent with normal messages.
Additional Notes
I'm new to Kotlin, so I might have done something wrong. I have run Spotless and Detekt to check for errors.