Skip to content
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

Fix for issue #44 (new settings behaviour in OctoPrint 1.3.0) #53

Merged
merged 1 commit into from
Dec 13, 2016

Conversation

foosel
Copy link
Contributor

@foosel foosel commented Dec 1, 2016

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 of
OctoPrint 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

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.
@derpicknicker1 derpicknicker1 merged commit ebfc120 into fabianonline:master Dec 13, 2016
@derpicknicker1
Copy link
Collaborator

Thanks for fixing this issue!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants