-
-
Notifications
You must be signed in to change notification settings - Fork 29
Support replies and reactions #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Hey there @broglep. Sorry to bother you, but could I perhaps have some feedback on this PR? |
|
Would you mind rebasing it to dev branch? Your changes overlap with a previous contribution: f974152 Unfortunately didn't find time to yet to get dev really released, and the existence of that dev branch is not that apparent. In case a rebase it too much work right now, I'll do it when preparing dev for a release |
|
Oh I see, that's actually a very relevant change. I'll get on the rebase right away. |
|
The rebase is finished. I've decided to alter some of the existing |
All text message events now include two extra fields - `reply_id` and `emoji`. These correspond to the same fields in the `Data` protobuf and can be used to determine whether the message is a reply or a reaction. The three service actions that send messages (Send Text, Broadcast Channel Message and Send Direct Message) now accept an `emoji` parameter, which will be reflected in the transmitted packet. This can be used together with the existing `reply_id` parameter to send reactions. I've decided to also simplify some of the existing `reply_id` code. We don't need an explicit `None` case, since zero already has exactly that meaning. This makes some of the code simpler and some of the events more predictable - `reply_id` now has exactly one value indicating that a message is not a reply (i.e. zero) and not two (i.e. both zero and `None`). I've also altered the descriptions for the `reply_id` field. They're now more in-line with the Meshtastic protobufs. Finally, I've changed the `reply_id` selectors to be templates, since you'll definitely be putting a template inside that field.
|
I feel like we don't need to wait for ov1d1u's opinion on the I've been running the extension with my changes for the past three weeks and it's been working well. |
|
Great that it work and you have tested it. Have you tried if the change is backwards compatible? I'm unsure if it will break existing automations that don't have reply_id and emoji field in the payload. |

All text message events now include two extra fields -
reply_idandemoji.These correspond to the same fields in the
Dataprotobuf and can be used to determine whether the message is a reply or a reaction.The three service actions that send messages (Send Text, Broadcast Channel Message and Send Direct Message) now accept an
emojiparameter, which will be reflected in the transmitted packet. This can be used together with the existingreply_idparameter to send reactions.I've decided to also simplify some of the existing
reply_idcode. We don't need an explicitNonecase, since zero already has exactly that meaning. This makes some of the code simpler and some of the events more predictable -reply_idnow has exactly one value indicating that a message is not a reply (i.e. zero) and not two (i.e. both zero andNone).I've also altered the descriptions for the
reply_idfield. They're now more in-line with the Meshtastic protobufs.Finally, I've changed the
reply_idselectors to be templates, since you'll definitely be putting a template inside that field.Please let me know if there's anything you'd like to see changed or improved. Thanks!