From 562dd7ccaef9270070d142e9d6cfe8aa164e072e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 4 Oct 2020 12:27:20 +0200 Subject: add toot and tweet settings to traewelling checkin --- lib/Travelynx/Controller/Traewelling.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/Travelynx/Controller/Traewelling.pm') diff --git a/lib/Travelynx/Controller/Traewelling.pm b/lib/Travelynx/Controller/Traewelling.pm index 78c501f..5a37b6e 100644 --- a/lib/Travelynx/Controller/Traewelling.pm +++ b/lib/Travelynx/Controller/Traewelling.pm @@ -76,7 +76,9 @@ sub settings { $self->traewelling->set_sync( uid => $uid, push_sync => $self->param('sync_source') eq 'travelynx' ? 1 : 0, - pull_sync => $self->param('sync_source') eq 'traewelling' ? 1 : 0 + pull_sync => $self->param('sync_source') eq 'traewelling' ? 1 : 0, + toot => $self->param('toot') ? 1 : 0, + tweet => $self->param('tweet') ? 1 : 0, ); $self->flash( success => 'traewelling' ); $self->redirect_to('account'); @@ -94,6 +96,12 @@ sub settings { else { $self->param( sync_source => 'none' ); } + if ( $traewelling->{data}{toot} ) { + $self->param( toot => 1 ); + } + if ( $traewelling->{data}{tweet} ) { + $self->param( tweet => 1 ); + } $self->render( 'traewelling', -- cgit v1.2.3