Remove media in text message detection

The method 'TextMatchers#getMessageTypeFromString' suggested MIME types
for linked files in text message. Also for links like this not working
example:

  - http://example.local/image.png
  - image.png

In those cases no image can be loaded and that results in empty previews
like shown in the issue #1167.

So for alignment reasons to spreed and Talk iOS app this media detection
is removed and only links will be shown.

Resolves: #1167

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2021-07-14 09:26:17 +02:00
parent b5cc62277d
commit 4c4c583923
No known key found for this signature in database
GPG Key ID: FECE3A7222C52A4E

View File

@ -2,6 +2,8 @@
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2021 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
*
* This program is free software: you can redistribute it and/or modify
@ -180,7 +182,7 @@ public class ChatMessage implements MessageContentType, MessageContentType.Image
}
return TextMatchers.getMessageTypeFromString(getText());
return MessageType.REGULAR_TEXT_MESSAGE;
}
public Map<String, String> getSelectedIndividualHashMap() {