Closed bkuhl closed 5 years ago
@bkuhl was taking a look at what you are working on and noticed that where you are replacing the hydrate
with make
in the Conversation Class was not where we noticed the threads in a withThreads
call was happening. We debugged and noticed that they were happening here too: https://github.com/helpscout/helpscout-api-php/blob/8a13f7eef210be2a4fae30fd9b4fb8f8b406fb80/src/Conversations/ConversationLoader.php#L46
@bkuhl was taking a look at what you are working on and noticed that where you are replacing the
hydrate
withmake
in the Conversation Class was not where we noticed the threads in awithThreads
call was happening. We debugged and noticed that they were happening here too:
Thanks for that input. You're right, this only solves part of it.
Once travis gets cleaned up lgtm!
When hydrating a Conversation's threads, we are now casting them to an object that represents their type. The factory in use already has a fallback to use
Thread
for unrecognized thread types.This is a follow up PR To https://github.com/helpscout/helpscout-api-php/pull/159.