Skip to content

Commit cfb75ca

Browse files
committed
Add fix for issue botman#1305
1 parent 3f2e631 commit cfb75ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Traits/HandlesConversations.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ public function removeStoredConversation($message = null)
107107
* Only remove it from the cache if it was not modified
108108
* after we loaded the data from the cache.
109109
*/
110-
if ($this->getStoredConversation($message)['time'] == $this->currentConversationData['time']) {
110+
111+
$conversation = $this->getStoredConversation($message);
112+
113+
// See https://github.com/botman/botman/issues/1305
114+
if (isset($conversation['time']) && ($conversation['time'] == $this->currentConversationData['time'])) {
111115
$this->cache->pull($this->message->getConversationIdentifier());
112116
$this->cache->pull($this->message->getOriginatedConversationIdentifier());
113117
}

0 commit comments

Comments
 (0)