mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 14:57:45 +00:00
Merge branch 'dev' of https://github.com/loki-project/session-android into open-group-invitations
This commit is contained in:
@@ -24,6 +24,11 @@ interface LokiAPIDatabaseProtocol {
|
||||
fun getLastDeletionServerID(group: Long, server: String): Long?
|
||||
fun setLastDeletionServerID(group: Long, server: String, newValue: Long)
|
||||
fun setUserCount(group: Long, server: String, newValue: Int)
|
||||
fun getLastMessageServerID(room: String, server: String): Long?
|
||||
fun setLastMessageServerID(room: String, server: String, newValue: Long)
|
||||
fun getLastDeletionServerID(room: String, server: String): Long?
|
||||
fun setLastDeletionServerID(room: String, server: String, newValue: Long)
|
||||
fun setUserCount(room: String, server: String, newValue: Int)
|
||||
fun getSessionRequestSentTimestamp(publicKey: String): Long?
|
||||
fun setSessionRequestSentTimestamp(publicKey: String, newValue: Long)
|
||||
fun getSessionRequestProcessedTimestamp(publicKey: String): Long?
|
||||
|
@@ -3,5 +3,5 @@ package org.session.libsignal.service.loki
|
||||
interface LokiMessageDatabaseProtocol {
|
||||
|
||||
fun getQuoteServerID(quoteID: Long, quoteePublicKey: String): Long?
|
||||
fun setServerID(messageID: Long, serverID: Long)
|
||||
fun setServerID(messageID: Long, serverID: Long, isSms: Boolean)
|
||||
}
|
||||
|
@@ -3,8 +3,10 @@ package org.session.libsignal.utilities;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.ResolvedType;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.JavaType;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
@@ -42,6 +44,10 @@ public class JsonUtil {
|
||||
return objectMapper.readValue(serialized, clazz);
|
||||
}
|
||||
|
||||
public static<T> T fromJson(String serialized, JavaType clazz) throws IOException {
|
||||
return objectMapper.readValue(serialized, clazz);
|
||||
}
|
||||
|
||||
public static <T> T fromJson(InputStream serialized, Class<T> clazz) throws IOException {
|
||||
return objectMapper.readValue(serialized, clazz);
|
||||
}
|
||||
|
Reference in New Issue
Block a user