Add App::poi to store the "person of interest" for a given page. This is so we can comanchificate the vcard_from_xchan widget -- it will pick up the target xchan from the page environment.

This commit is contained in:
friendica
2013-12-18 14:53:18 -08:00
parent 38fd8410eb
commit 1a4c91ccf5
4 changed files with 31 additions and 32 deletions

View File

@@ -374,15 +374,14 @@ function message_content(&$a) {
return $o;
}
$other_channel = null;
if($messages[0]['to_xchan'] === $channel['channel_hash'])
$other_channel = $messages[0]['from'];
$a->poi = $messages[0]['from'];
else
$other_channel = $messages[0]['to'];
$a->poi = $messages[0]['to'];
require_once('include/Contact.php');
$a->set_widget('mail_conversant',vcard_from_xchan($other_channel,$get_observer_hash,'mail'));
$a->set_widget('mail_conversant',vcard_from_xchan($a->poi,$get_observer_hash,'mail'));
$tpl = get_markup_template('msg-header.tpl');