Rehomed Dog - Previous Owner Threatens Legal Action (need Advice)

Hi everyone,
I'm hoping to get some general legal advice on a situation with a dog. This isn't a substitute for a lawyer, but any insights would be greatly appreciated!
Here's the situation:
A friend (let's call them John) gave me their dog a few months ago. John was going through some personal issues and couldn't provide proper care for the dog anymore. We texted about it beforehand, and John confirmed they wanted to rehome the dog and asked when a good time to pick it up would be.
I've been taking care of the dog ever since, and it's become a cherished part of my life. Recently, John texted me out of the blue saying they want the dog back and are threatening legal action if I don't return it. They seem to think the dog's birth certificate is proof of ownership, but I thought giving away a pet meant giving up ownership rights?
What I have:
Texts from John confirming they wanted to rehome the dog and arranging the pick-up. Receipts for vet bills, food, and other dog-related expenses. What I'm wondering:
Do those texts hold weight as evidence of ownership transfer? Is a dog's birth certificate enough proof for John to take the dog back? What are my options if John pursues legal action? Thanks in advance for any advice! I understand this isn't a formal consultation, but any insights would be helpful as I consider getting a lawyer involved.
P.S. There might be a complication. In one of the texts, I mentioned something like "if you ever change your mind he's here for you." However, the overall conversation made it clear it was supposed to be a permanent handover.
Thanks again!
[link] [comments]