Fix for issue #44 (new settings behaviour in OctoPrint 1.3.0) #53
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.
Only attempt to access such keys in the provided settings that
are actually there and in the frontend manually persist chats
as received from own plugin endpoint to global settings
endpoint in order to trigger on_settings_save processing.
This is a bit dirty but basically emulates what the click on
Save in the settings dialog used to do (I think - I have to admit
I was a bit confused by the whole back-and-forth). After completion
of the new save call it's actually no longer necessary to explicitly
click Save on the Settings dialog, but it was completely unclear
to me how to properly set the new status for a newly added chat
without that roundtrip.
Tested against 1.2.18, 1.3.0rc2 and current
devel
branch ofOctoPrint by deleting existing configuration and going through
full setup routine, then running a test print and checking if
I was notified at the end as configured. Appears to have worked,
got my notifications and also replies to any commands I sent
as expected. You still should give it a critical review because I
might have overlooked something in bot handling that I simply
don't know but would be obvious for someone familiar with
telegram bots.
Should solve #44