Fixed deprecated call
This commit is contained in:
parent
4e898fa4f2
commit
3171dcac8d
|
@ -1,5 +1,6 @@
|
|||
package eu.siacs.conversations.parser;
|
||||
|
||||
import android.os.Build;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
@ -116,8 +117,12 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
|||
}
|
||||
if (clientMightSendHtml(conversation.getAccount(), from)) {
|
||||
Log.d(Config.LOGTAG,conversation.getAccount().getJid().toBareJid()+": received OTR message from bad behaving client. escaping HTML…");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
body = Html.fromHtml(body,Html.FROM_HTML_MODE_LEGACY).toString();
|
||||
} else {
|
||||
body = Html.fromHtml(body).toString();
|
||||
}
|
||||
}
|
||||
|
||||
final OtrService otrService = conversation.getAccount().getOtrService();
|
||||
Message finishedMessage = new Message(conversation, body, Message.ENCRYPTION_OTR, Message.STATUS_RECEIVED);
|
||||
|
|
Loading…
Reference in a new issue