diff --git a/matrix-sdk/src/main/java/org/matrix/androidsdk/data/Room.java b/matrix-sdk/src/main/java/org/matrix/androidsdk/data/Room.java index fbb4dbc2c..7faf1c2a0 100644 --- a/matrix-sdk/src/main/java/org/matrix/androidsdk/data/Room.java +++ b/matrix-sdk/src/main/java/org/matrix/androidsdk/data/Room.java @@ -1227,8 +1227,13 @@ private List handleReceiptEvent(Event event) { for (String paramName : paramsDict.keySet()) { if (TextUtils.equals("ts", paramName)) { - Double value = (Double) paramsDict.get(paramName); - long ts = value.longValue(); + Object value = paramsDict.get(paramName); + long ts; + if (value instanceof Long) { + ts = ((Long) value); + } else { + ts = ((Double) value).longValue(); + } if (handleReceiptData(new ReceiptData(userID, eventId, ts))) { senderIDs.add(userID);