mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Reformat files
This commit is contained in:
parent
5a4f4ba6db
commit
0a287b0b3e
5 changed files with 27 additions and 36 deletions
|
@ -592,7 +592,7 @@ public class AccountDatabase extends Database {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (oldVersion < 26) {
|
if (oldVersion < 26) {
|
||||||
logger.debug("Updating database: Create discoverabel and profile_phone_number_sharing columns");
|
logger.debug("Updating database: Create discoverable and profile_phone_number_sharing columns");
|
||||||
try (final var statement = connection.createStatement()) {
|
try (final var statement = connection.createStatement()) {
|
||||||
statement.executeUpdate("""
|
statement.executeUpdate("""
|
||||||
ALTER TABLE recipient ADD discoverable INTEGER;
|
ALTER TABLE recipient ADD discoverable INTEGER;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.asamk.signal.manager.api.MessageEnvelope;
|
||||||
record JsonEditMessage(long targetSentTimestamp, JsonDataMessage dataMessage) {
|
record JsonEditMessage(long targetSentTimestamp, JsonDataMessage dataMessage) {
|
||||||
|
|
||||||
static JsonEditMessage from(MessageEnvelope.Edit editMessage, Manager m) {
|
static JsonEditMessage from(MessageEnvelope.Edit editMessage, Manager m) {
|
||||||
return new JsonEditMessage(editMessage.targetSentTimestamp(), JsonDataMessage.from(editMessage.dataMessage(), m));
|
return new JsonEditMessage(editMessage.targetSentTimestamp(),
|
||||||
|
JsonDataMessage.from(editMessage.dataMessage(), m));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,16 +65,10 @@ public record JsonMessageEnvelope(
|
||||||
final var receiptMessage = envelope.receipt().map(JsonReceiptMessage::from).orElse(null);
|
final var receiptMessage = envelope.receipt().map(JsonReceiptMessage::from).orElse(null);
|
||||||
final var typingMessage = envelope.typing().map(JsonTypingMessage::from).orElse(null);
|
final var typingMessage = envelope.typing().map(JsonTypingMessage::from).orElse(null);
|
||||||
|
|
||||||
final var dataMessage = envelope.data()
|
final var dataMessage = envelope.data().map(data -> JsonDataMessage.from(data, m)).orElse(null);
|
||||||
.map(data -> JsonDataMessage.from(data, m))
|
final var editMessage = envelope.edit().map(data -> JsonEditMessage.from(data, m)).orElse(null);
|
||||||
.orElse(null);
|
|
||||||
final var editMessage = envelope.edit()
|
|
||||||
.map(data -> JsonEditMessage.from(data, m))
|
|
||||||
.orElse(null);
|
|
||||||
final var storyMessage = envelope.story().map(JsonStoryMessage::from).orElse(null);
|
final var storyMessage = envelope.story().map(JsonStoryMessage::from).orElse(null);
|
||||||
final var syncMessage = envelope.sync()
|
final var syncMessage = envelope.sync().map(data -> JsonSyncMessage.from(data, m)).orElse(null);
|
||||||
.map(data -> JsonSyncMessage.from(data, m))
|
|
||||||
.orElse(null);
|
|
||||||
final var callMessage = envelope.call().map(JsonCallMessage::from).orElse(null);
|
final var callMessage = envelope.call().map(JsonCallMessage::from).orElse(null);
|
||||||
|
|
||||||
return new JsonMessageEnvelope(source,
|
return new JsonMessageEnvelope(source,
|
||||||
|
|
|
@ -23,11 +23,7 @@ record JsonSyncDataMessage(
|
||||||
.orElse(null),
|
.orElse(null),
|
||||||
transcriptMessage.destination().flatMap(RecipientAddress::number).orElse(null),
|
transcriptMessage.destination().flatMap(RecipientAddress::number).orElse(null),
|
||||||
transcriptMessage.destination().flatMap(address -> address.uuid().map(UUID::toString)).orElse(null),
|
transcriptMessage.destination().flatMap(address -> address.uuid().map(UUID::toString)).orElse(null),
|
||||||
transcriptMessage.editMessage()
|
transcriptMessage.editMessage().map(data -> JsonEditMessage.from(data, m)).orElse(null),
|
||||||
.map(data -> JsonEditMessage.from(data, m))
|
transcriptMessage.message().map(data -> JsonDataMessage.from(data, m)).orElse(null));
|
||||||
.orElse(null),
|
|
||||||
transcriptMessage.message()
|
|
||||||
.map(data -> JsonDataMessage.from(data, m))
|
|
||||||
.orElse(null));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue