WIP IP Logging

This commit is contained in:
Jan Dorsman
2015-10-24 19:14:15 +02:00
parent 5e2f659f54
commit 49fddbd450
5 changed files with 47 additions and 4 deletions

View File

@ -54,9 +54,10 @@ class CreatePostController extends AbstractCreateController
$actor = $request->getAttribute('actor');
$data = array_get($request->getParsedBody(), 'data');
$discussionId = array_get($data, 'relationships.discussion.data.id');
$ipAddress = array_get($request->getServerParams(), 'REMOTE_ADDR', '127.0.0.1');
$post = $this->bus->dispatch(
new PostReply($discussionId, $actor, $data)
new PostReply($discussionId, $actor, $data, $ipAddress)
);
// After replying, we assume that the user has seen all of the posts