From 531eff3ca3f4f8a121277603664442e367bb42c0 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 1 Oct 2015 11:34:01 +0200 Subject: [PATCH] Fix sending invitations with UTF-8 chars --- vroom | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vroom b/vroom index 8d9cba1..521eaf1 100755 --- a/vroom +++ b/vroom @@ -23,6 +23,7 @@ use File::Path qw(make_path); use File::Basename; use DateTime; use Array::Diff; +use Encode qw(encode_utf8); use Data::Dumper; use lib dirname($0) . '/lib'; @@ -1662,7 +1663,7 @@ any '/api' => sub { $self->login; $self->purge_api_keys; my $token = $self->req->headers->header('X-VROOM-API-Key') || $self->session('key'); - my $req = Mojo::JSON::decode_json($self->param('req')); + my $req = Mojo::JSON::decode_json(encode_utf8($self->param('req'))); my $room; # action and param are required for every API call if (!$req->{action} || !$req->{param}){