Remove dead code and fix inspection issues

This commit is contained in:
AsamK 2021-12-05 10:25:46 +01:00
parent 6ffeb7c431
commit e83f43065e
13 changed files with 10 additions and 82 deletions

View file

@ -2,7 +2,6 @@ package org.asamk.signal.json;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.asamk.Signal;
import org.asamk.signal.manager.api.MessageEnvelope;
import java.util.List;
@ -65,38 +64,4 @@ record JsonDataMessage(
contacts,
groupInfo);
}
static JsonDataMessage from(Signal.MessageReceived messageReceived) {
return new JsonDataMessage(messageReceived.getTimestamp(),
messageReceived.getMessage(),
// TODO Replace these with the proper commands
null,
null,
null,
null,
null,
null,
messageReceived.getAttachments().stream().map(JsonAttachment::from).collect(Collectors.toList()),
null,
null,
null,
messageReceived.getGroupId().length > 0 ? JsonGroupInfo.from(messageReceived.getGroupId()) : null);
}
static JsonDataMessage from(Signal.SyncMessageReceived messageReceived) {
return new JsonDataMessage(messageReceived.getTimestamp(),
messageReceived.getMessage(),
// TODO Replace these with the proper commands
null,
null,
null,
null,
null,
null,
messageReceived.getAttachments().stream().map(JsonAttachment::from).collect(Collectors.toList()),
null,
null,
null,
messageReceived.getGroupId().length > 0 ? JsonGroupInfo.from(messageReceived.getGroupId()) : null);
}
}