-
Notifications
You must be signed in to change notification settings - Fork 248
Add per-channel flags; support "no store" channels #1052
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
Add a "no store" flag for channels
|
@liamcottle would you like me to add |
|
Also, you really need to get buy-in from Liam, to support modifying the CMD_GET_CHANNEL and CMD_SET_CHANNEL companion protocol |
|
@ripplebiz thank you for the code review! Updated with your feedback.
I think it makes sense to add new commands for getting and setting the flags for a given channel at a time. I'll work on that next! |
In the PugetMesh community we have channels like #bot and #testing that are mostly used for "can you hear me?" tests. These are the most heavily-used channels in the region, yet the messages are not useful to store offline - they take up space on the device and are time-consuming to sync when reconnecting a phone to the companion.
This PR introduces a per-channel "no store" flag that tells the companion not to store any messages for the channel unless a phone is connected. This reserves more offline storage for channels that actually matter, and makes reconnecting faster.
This PR also introduces the concept of channel flags. These are persisted in the unused 4-byte header of each channel in the data store. Other per-channel settings such as notifications enabled/disabled can be stored here in the future.
Testing performed on a WisMesh Tag:
Upgrade
noStore=false.Behavior when noStore = false
Behavior when noStore = true
Settings persistence
CMD_SET_CHANNELto persist the channel flags after a change