summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-10-03 14:33:56 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-10-03 14:33:56 +0200
commit2cc31422b7f36fa9e0706b83cb295ba3952d9f85 (patch)
tree9b75a6590e396fb1555836df08de1eb78db2ca9b
parentb0de6628b3be023e9cdebba05b97439ec7ae77e9 (diff)
sync travelynx -> Träwelling: add comment
-rw-r--r--lib/Travelynx/Helper/Traewelling.pm4
-rw-r--r--lib/Travelynx/Model/Traewelling.pm1
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/Travelynx/Helper/Traewelling.pm b/lib/Travelynx/Helper/Traewelling.pm
index 36af239..c6b3dd0 100644
--- a/lib/Travelynx/Helper/Traewelling.pm
+++ b/lib/Travelynx/Helper/Traewelling.pm
@@ -285,6 +285,10 @@ sub checkin {
$opt{dep_eva}
);
+ if ( $opt{user_data}{comment} ) {
+ $request->{body} = $opt{user_data}{comment};
+ }
+
# Work around https://github.com/Traewelling/traewelling/issues/72
$self->{user_agent}->request_timeout(20)
->get_p(
diff --git a/lib/Travelynx/Model/Traewelling.pm b/lib/Travelynx/Model/Traewelling.pm
index 181c519..1a2f4ec 100644
--- a/lib/Travelynx/Model/Traewelling.pm
+++ b/lib/Travelynx/Model/Traewelling.pm
@@ -185,6 +185,7 @@ sub get_pushable_accounts {
my ($self) = @_;
my $res = $self->{pg}->db->query(
qq{select t.user_id as uid, t.token as token, t.data as data,
+ i.user_data as user_data,
i.checkin_station_id as dep_eva, i.checkout_station_id as arr_eva,
i.data as journey_data, i.train_type as train_type,
i.train_line as train_line, i.train_no as train_no,