public function updateHashtagsFromBody(AnCommandContext $context)
    {
        $entity = $this->getItem();
        $terms = $this->extractHashtagTerms($entity->body);
        
        if (is_array($terms)) {
            foreach ($entity->hashtags as $hashtag) {
                if (!in_array($hashtag->name, array_map('strtolower', $terms))) {
                    $entity->removeHashtag($hashtag->name);
                }
            }
        }

        foreach ($terms as $term) {
            $entity->addHashtag(trim($term));
        }
    }