<?php

class XenPushover_DataWriter_Alert extends XFCP_XenPushover_DataWriter_Alert
{
	/**
	 * Send notifications via Pushover if applicable
	 */
	protected function _postSave()
	{
		if ($this->isInsert())
		{
			$this->getModelFromCache('XenPushover_Model_Pushover')->queue($this->get('alert_id'), $this->get('alerted_user_id'), XenForo_Application::$time);
		}

		parent::_postSave();
	}
}