Fixed XF\Service\User\Welcome->sendMessage() should return $conversation

nocte

Well-known member
Affected version
2.0.9
I am not sure if this is worth a bug report, but I think the method sendMessage() in the class XF\Service\User\Welcome should return the $conversation object.

Just 1 line, that does not hurt (i hope) and one could use the $conversation info for logging the ID and later do things like append messages to the the welcome conversation (for example).

:)
 
Unfortunately changing the return value of a method would be a breaking change as any add-on which currently extends that method probably wouldn't be returning anything, so you could find a situation where you'd never get that return value back.

What I've added instead is two new methods getSentMessage and getSentMail which are set at the end of the respective sendMessage and sendMail methods, so you should be able to do something with that.
 
Back
Top Bottom