Change some Salmon events and similar

Use Profile instead of User and (if we know it) send along the target
profile, so a Diaspora plugin can encrypt to the receiver.
This commit is contained in:
Mikael Nordfeldth
2015-10-04 17:23:11 +02:00
parent f4ed171397
commit 6afa091dca
3 changed files with 10 additions and 8 deletions

View File

@@ -40,8 +40,9 @@ class SalmonQueueHandler extends QueueHandler
assert(is_string($data['entry']));
$actor = Profile::getKV($data['actor']);
$target = array_key_exists('target', $data) ? Profile::getKV($data['target']) : null;
Salmon::post($data['salmonuri'], $data['entry'], $actor->getUser());
Salmon::post($data['salmonuri'], $data['entry'], $actor, $target);
// @fixme detect failure and attempt to resend
return true;