From f204c0d7ced9c98c62fa9cc4dd9c690598e0b68b Mon Sep 17 00:00:00 2001 From: Alex Owson <47344744+alexowson@users.noreply.github.com> Date: Mon, 25 May 2020 03:28:18 -0500 Subject: [PATCH 1/2] Update FacebookLocationDriver.php Fix. Sometimes coordinates field is not present. --- src/FacebookLocationDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FacebookLocationDriver.php b/src/FacebookLocationDriver.php index 038560b..8bf5891 100644 --- a/src/FacebookLocationDriver.php +++ b/src/FacebookLocationDriver.php @@ -77,7 +77,7 @@ public function getLocation(array $messages) $data = Collection::make($messages['message']['attachments'])->where('type', 'location')->pluck('payload')->first(); - return new Location($data['coordinates']['lat'], $data['coordinates']['long'], $data); + return new Location(@$data['coordinates']['lat'], @$data['coordinates']['long'], $data); } /** From 37b74935a46a0a6c234a78508ecef072a1ddc80a Mon Sep 17 00:00:00 2001 From: "alex@owson.com" Date: Mon, 8 Jun 2020 16:03:02 -0500 Subject: [PATCH 2/2] Creating new package --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fd1e677..20ef094 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "botman/driver-facebook", + "name": "alexowson/botman-driver-facebook", "license": "MIT", "description": "Facebook Messenger driver for BotMan", "keywords": [