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) {
|
||||
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()) {
|
||||
statement.executeUpdate("""
|
||||
ALTER TABLE recipient ADD discoverable INTEGER;
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.asamk.signal.manager.api.MessageEnvelope;
|
|||
record JsonEditMessage(long targetSentTimestamp, JsonDataMessage dataMessage) {
|
||||
|
||||
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 typingMessage = envelope.typing().map(JsonTypingMessage::from).orElse(null);
|
||||
|
||||
final var dataMessage = envelope.data()
|
||||
.map(data -> JsonDataMessage.from(data, m))
|
||||
.orElse(null);
|
||||
final var editMessage = envelope.edit()
|
||||
.map(data -> JsonEditMessage.from(data, m))
|
||||
.orElse(null);
|
||||
final var dataMessage = envelope.data().map(data -> JsonDataMessage.from(data, m)).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 syncMessage = envelope.sync()
|
||||
.map(data -> JsonSyncMessage.from(data, m))
|
||||
.orElse(null);
|
||||
final var syncMessage = envelope.sync().map(data -> JsonSyncMessage.from(data, m)).orElse(null);
|
||||
final var callMessage = envelope.call().map(JsonCallMessage::from).orElse(null);
|
||||
|
||||
return new JsonMessageEnvelope(source,
|
||||
|
|
|
@ -23,11 +23,7 @@ record JsonSyncDataMessage(
|
|||
.orElse(null),
|
||||
transcriptMessage.destination().flatMap(RecipientAddress::number).orElse(null),
|
||||
transcriptMessage.destination().flatMap(address -> address.uuid().map(UUID::toString)).orElse(null),
|
||||
transcriptMessage.editMessage()
|
||||
.map(data -> JsonEditMessage.from(data, m))
|
||||
.orElse(null),
|
||||
transcriptMessage.message()
|
||||
.map(data -> JsonDataMessage.from(data, m))
|
||||
.orElse(null));
|
||||
transcriptMessage.editMessage().map(data -> JsonEditMessage.from(data, m)).orElse(null),
|
||||
transcriptMessage.message().map(data -> JsonDataMessage.from(data, m)).orElse(null));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue