-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix faulty file type determination logic
- Previously we assumed that all files attached to a message were the same mime/content type. For some messengers, grouped files are received as one message and can have different mime/content types. We now check if any files attached to a message are of a certain type and then display all these file types correctly.
- Loading branch information
Showing
5 changed files
with
45 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
app/components/chat_message_audio/chat_message_audio.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<div class="ChatMessageAudio"> | ||
<audio controls> | ||
<source src="<%= url_for(audio.attachment) %>" type="audio/ogg"> | ||
<%= t 'components.chat_message_audio.no_audio_support' %> | ||
</audio> | ||
<% audios.each do |audio| %> | ||
<audio controls> | ||
<source src="<%= url_for(audio.attachment) %>" type="audio/ogg"> | ||
<%= t 'components.chat_message_audio.no_audio_support' %> | ||
</audio> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters