Browse Source

Integrate video messages in Chats, Notifications and ContactData

pull/978/head
Timothée Jaussoin 5 years ago
parent
commit
be95f66b26
  1. 11
      app/widgets/Chat/Chat.php
  2. 2
      app/widgets/Chats/_chats_item.tpl
  3. 1
      app/widgets/Chats/locales.ini
  4. 2
      app/widgets/ContactData/_contactdata.tpl

11
app/widgets/Chat/Chat.php

@ -109,9 +109,14 @@ class Chat extends \Movim\Widget\Base
}
if ($message->file) {
$rawbody = (typeIsPicture($message->file['type']))
? '🖼️ ' . $this->__('chats.picture')
: '📄 ' . $this->__('avatar.file');
$rawbody = '📄 ' . $this->__('avatar.file');
if (typeIsPicture($message->file['type'])) {
$rawbody = '🖼️ ' . $this->__('chats.picture');
}
if (typeIsVideo($message->file['type'])) {
$rawbody = '🎞️ ' . $this->__('chats.video');
}
}
if ($message->user_id == $message->jidto

2
app/widgets/Chats/_chats_item.tpl

@ -88,6 +88,8 @@
{/if}
{if="typeIsPicture($message->file['type'])"}
<i class="material-icons">image</i> {$c->__('chats.picture')}
{elseif="typeIsVideo($message->file['type'])"}
<i class="material-icons">local_movies</i> {$c->__('chats.video')}
{else}
<i class="material-icons">insert_drive_file</i> {$c->__('avatar.file')}
{/if}

1
app/widgets/Chats/locales.ini

@ -4,6 +4,7 @@ empty = Start a new conversation by clicking on the %s button.
add = Chat with a contact
me = Me
picture = Picture
video = Video
[button]
chat = Chat

2
app/widgets/ContactData/_contactdata.tpl

@ -140,6 +140,8 @@
{/if}
{if="typeIsPicture($message->file['type'])"}
<i class="material-icons">image</i> {$c->__('chats.picture')}
{elseif="typeIsVideo($message->file['type'])"}
<i class="material-icons">local_movies</i> {$c->__('chats.video')}
{else}
<i class="material-icons">insert_drive_file</i> {$c->__('avatar.file')}
{/if}

Loading…
Cancel
Save