public function dislike($userId) { $voteId = VideoVote::generateId(6); VideoVote::create(array('id' => $voteId, 'user_id' => $userId, 'type' => 'video', 'obj_id' => $this->id, 'action' => 'dislike')); $this->dislikes++; $this->save(); ChannelAction::create(array('id' => ChannelAction::generateId(6), 'channel_id' => User::find($userId)->getMainChannel()->id, 'recipients_ids' => ChannelAction::filterReceiver(UserChannel::find($this->poster_id)->admins_ids, "dislike"), 'type' => 'dislike', 'target' => $this->id, 'timestamp' => Utils::tps())); }