Browse Source

- Fix some issues for the message carbons feature

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
46be94f69f
  1. 2
      app/models/contact/Contact.php
  2. 4
      app/widgets/Chat/Chat.php
  3. 6
      app/widgets/ContactCard/ContactCard.php

2
app/models/contact/Contact.php

@ -168,7 +168,9 @@ class Contact extends ModlModel {
} }
public function createThumbnails() { public function createThumbnails() {
if(isset($this->photobin))
\createThumbnails(strtolower($this->jid), $this->photobin); \createThumbnails(strtolower($this->jid), $this->photobin);
if(isset($this->email))
\createEmailPic(strtolower($this->jid), $this->email); \createEmailPic(strtolower($this->jid), $this->email);
} }

4
app/widgets/Chat/Chat.php

@ -111,12 +111,12 @@ class Chat extends WidgetBase
'messages'.$contact->jid, 'messages'.$contact->jid,
$html); $html);
if($message->session != $message->jidfrom) {
//if($message->session != $message->jidfrom) {
RPC::call('hideComposing', RPC::call('hideComposing',
$contact->jid); $contact->jid);
RPC::call('hidePaused', RPC::call('hidePaused',
$contact->jid); $contact->jid);
}
//}
RPC::call('scrollTalk', RPC::call('scrollTalk',
'messages'.$contact->jid); 'messages'.$contact->jid);

6
app/widgets/ContactCard/ContactCard.php

@ -58,10 +58,7 @@ class ContactCard extends WidgetCommon
<span>'.$contact->name.'</span> <span>'.$contact->name.'</span>
</div>'; </div>';
if(
$contact->date != '0000-00-00T00:00:00+0000'
&& $contact->date != '1970-01-01T00:00:00+0000'
&& $this->testIsSet($contact->date))
if($this->testIsSet($contact->date))
$html .= '<div class="element simple"> $html .= '<div class="element simple">
<label for="day">'.t('Date of Birth').'</label> <label for="day">'.t('Date of Birth').'</label>
<span>'.date('j M Y',strtotime($contact->date)).'</span> <span>'.date('j M Y',strtotime($contact->date)).'</span>
@ -79,7 +76,6 @@ class ContactCard extends WidgetCommon
<span>'.$marital[$contact->marital].'</span> <span>'.$marital[$contact->marital].'</span>
</div>'; </div>';
// <a target="_blank" href="mailto:'.$contact->email.'">'.$contact->email.'</a>
if($this->testIsSet($contact->email)) { if($this->testIsSet($contact->email)) {
if(filter_var($contact->email, FILTER_VALIDATE_EMAIL)) { if(filter_var($contact->email, FILTER_VALIDATE_EMAIL)) {
$html .= '<div class="element simple"> $html .= '<div class="element simple">

Loading…
Cancel
Save