<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Activity_Model_Comment extends Core_Model_Comment
{
  protected $resource_type = 'activity_action';

  public function tags()
  {
    return new Engine_ProxyObject($this, Engine_Api::_()->getDbtable('tags', 'core'));
  }

  protected function _delete()
  {
    $hashtags = Engine_Api::_()->activity()->getHashTags($this->body);
    $this->tags()->removeTagMaps($hashtags[0]);
    parent::_delete();
  }
}
