Browse Source

- Hide notification when an encrypted message is published

- Fix little CSS issues
pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
dec59cef60
  1. 9
      app/widgets/Chat/Chat.php
  2. 4
      app/widgets/ServerNodes/ServerNodes.php
  3. 4
      themes/movim/css/template.css

9
app/widgets/Chat/Chat.php

@ -24,6 +24,8 @@ use Moxl\Xec\Action\Presence\Unavaiable;
class Chat extends WidgetBase {
private $_encrypted = false;
function load() {
$this->addcss('chat.css');
$this->addjs('chat.js');
@ -76,6 +78,7 @@ class Chat extends WidgetBase {
private function checkEncrypted($message) {
if(preg_match("#^\?OTR#", $message->body)) {
$this->_encrypted = true;
$message->body = $this->__('message.encrypted');
}
@ -98,13 +101,17 @@ class Chat extends WidgetBase {
$message = $this->checkEncrypted($message);
if($contact!=null && $message->session != $message->jidfrom) {
if($contact != null
&& $message->session != $message->jidfrom
&& $this->_encrypted == false) {
RPC::call(
'notify',
$contact->getTrueName(),
$message->body,
$contact->getPhoto('m'));
}
$this->_encrypted = false;
if($contact != null && $contact->chaton == 0) {
$contact->chaton = 2;

4
app/widgets/ServerNodes/ServerNodes.php

@ -120,9 +120,9 @@ class ServerNodes extends WidgetCommon
}
$html .= '
<li>
<li class="block">
<a '.$url.'>'.
$i->getName().
'<span class="content">'.$i->getName().'</span>'.
$tags.'
</a>
</li>';

4
themes/movim/css/template.css

@ -32,6 +32,10 @@
width: 100%;
}
.block:nth-of-type(even) {
padding-right: 0.5em;
}
}
@media screen and (max-width: 1024px) {

Loading…
Cancel
Save