mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 20:40:38 +00:00
fix unmerged files
This commit is contained in:
parent
685fce477c
commit
cc5bb13519
5 changed files with 6 additions and 57 deletions
|
@ -161,14 +161,11 @@ import java.util.concurrent.TimeoutException;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
<<<<<<< HEAD:src/main/java/org/asamk/signal/manager/Manager.java
|
|
||||||
import static org.asamk.signal.manager.ServiceConfig.CDS_MRENCLAVE;
|
import static org.asamk.signal.manager.ServiceConfig.CDS_MRENCLAVE;
|
||||||
import static org.asamk.signal.manager.ServiceConfig.capabilities;
|
import static org.asamk.signal.manager.ServiceConfig.capabilities;
|
||||||
import static org.asamk.signal.util.ErrorUtils.handleAssertionError;
|
import static org.asamk.signal.util.ErrorUtils.handleAssertionError;
|
||||||
import static org.asamk.signal.manager.ServiceConfig.getIasKeyStore;
|
import static org.asamk.signal.manager.ServiceConfig.getIasKeyStore;
|
||||||
=======
|
|
||||||
import static org.asamk.signal.manager.config.ServiceConfig.capabilities;
|
import static org.asamk.signal.manager.config.ServiceConfig.capabilities;
|
||||||
>>>>>>> upstream/master:lib/src/main/java/org/asamk/signal/manager/Manager.java
|
|
||||||
|
|
||||||
public class Manager implements Closeable {
|
public class Manager implements Closeable {
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,8 @@ public class Commands {
|
||||||
addCommand("addDevice", new AddDeviceCommand());
|
addCommand("addDevice", new AddDeviceCommand());
|
||||||
addCommand("block", new BlockCommand());
|
addCommand("block", new BlockCommand());
|
||||||
addCommand("daemon", new DaemonCommand());
|
addCommand("daemon", new DaemonCommand());
|
||||||
<<<<<<< HEAD
|
|
||||||
addCommand("stdio", new StdioCommand());
|
addCommand("stdio", new StdioCommand());
|
||||||
=======
|
|
||||||
addCommand("getUserStatus", new GetUserStatusCommand());
|
addCommand("getUserStatus", new GetUserStatusCommand());
|
||||||
>>>>>>> upstream/master
|
|
||||||
addCommand("link", new LinkCommand());
|
addCommand("link", new LinkCommand());
|
||||||
addCommand("listContacts", new ListContactsCommand());
|
addCommand("listContacts", new ListContactsCommand());
|
||||||
addCommand("listDevices", new ListDevicesCommand());
|
addCommand("listDevices", new ListDevicesCommand());
|
||||||
|
|
|
@ -129,15 +129,9 @@ public class SendCommand implements DbusCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
<<<<<<< HEAD
|
|
||||||
System.out.println(Arrays.toString(ns.getList("recipient").toArray()));
|
System.out.println(Arrays.toString(ns.getList("recipient").toArray()));
|
||||||
long timestamp = signal.sendMessage(messageText, attachments, ns.getList("recipient"));
|
|
||||||
System.out.println(timestamp);
|
|
||||||
return 0;
|
|
||||||
=======
|
|
||||||
var timestamp = signal.sendMessage(messageText, attachments, recipients);
|
var timestamp = signal.sendMessage(messageText, attachments, recipients);
|
||||||
writer.println("{}", timestamp);
|
writer.println("{}", timestamp);
|
||||||
>>>>>>> upstream/master
|
|
||||||
} catch (AssertionError e) {
|
} catch (AssertionError e) {
|
||||||
handleAssertionError(e);
|
handleAssertionError(e);
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -125,19 +125,18 @@ class JsonDataMessage {
|
||||||
} else {
|
} else {
|
||||||
this.attachments = List.of();
|
this.attachments = List.of();
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
/*if (dataMessage.getReaction().isPresent()) { // not sure if json reactions have been implemented elsewhere
|
||||||
if (dataMessage.getReaction().isPresent()) {
|
|
||||||
final SignalServiceDataMessage.Reaction reaction = dataMessage.getReaction().get();
|
final SignalServiceDataMessage.Reaction reaction = dataMessage.getReaction().get();
|
||||||
this.reaction = new JsonReaction(reaction);
|
this.reaction = new JsonReaction(reaction);
|
||||||
/* this.emoji = reaction.getEmoji();
|
this.emoji = reaction.getEmoji();
|
||||||
this.targetAuthor = reaction.getTargetAuthor().getLegacyIdentifier();
|
this.targetAuthor = reaction.getTargetAuthor().getLegacyIdentifier();
|
||||||
this.targetTimestamp = reaction.getTargetSentTimestamp();
|
this.targetTimestamp = reaction.getTargetSentTimestamp();
|
||||||
*/ } /*else {
|
} else {
|
||||||
this.reaction = null;
|
this.reaction = null;
|
||||||
this.emoji = "";
|
this.emoji = "";
|
||||||
this.targetAuthor = "";
|
this.targetAuthor = "";
|
||||||
this.targetTimestamp = 0;
|
this.targetTimestamp = 0;
|
||||||
=======
|
}*/
|
||||||
this.sticker = dataMessage.getSticker().isPresent() ? new JsonSticker(dataMessage.getSticker().get()) : null;
|
this.sticker = dataMessage.getSticker().isPresent() ? new JsonSticker(dataMessage.getSticker().get()) : null;
|
||||||
|
|
||||||
if (dataMessage.getSharedContacts().isPresent()) {
|
if (dataMessage.getSharedContacts().isPresent()) {
|
||||||
|
@ -150,7 +149,6 @@ class JsonDataMessage {
|
||||||
this.contacts = List.of();
|
this.contacts = List.of();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>>>>>>> upstream/master
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,17 +12,6 @@ import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JsonMessageEnvelope {
|
public class JsonMessageEnvelope {
|
||||||
<<<<<<< HEAD
|
|
||||||
String source;
|
|
||||||
int sourceDevice;
|
|
||||||
String relay;
|
|
||||||
long timestamp;
|
|
||||||
JsonDataMessage dataMessage;
|
|
||||||
JsonSyncMessage syncMessage;
|
|
||||||
JsonCallMessage callMessage;
|
|
||||||
JsonReceiptMessage receiptMessage;
|
|
||||||
// String typingAction;
|
|
||||||
=======
|
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
final String source;
|
final String source;
|
||||||
|
@ -56,7 +45,6 @@ public class JsonMessageEnvelope {
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
final JsonTypingMessage typingMessage;
|
final JsonTypingMessage typingMessage;
|
||||||
>>>>>>> upstream/master
|
|
||||||
|
|
||||||
public JsonMessageEnvelope(SignalServiceEnvelope envelope, SignalServiceContent content, Manager m) {
|
public JsonMessageEnvelope(SignalServiceEnvelope envelope, SignalServiceContent content, Manager m) {
|
||||||
if (!envelope.isUnidentifiedSender() && envelope.hasSource()) {
|
if (!envelope.isUnidentifiedSender() && envelope.hasSource()) {
|
||||||
|
@ -81,30 +69,6 @@ public class JsonMessageEnvelope {
|
||||||
} else {
|
} else {
|
||||||
this.receiptMessage = null;
|
this.receiptMessage = null;
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
if (content != null) {
|
|
||||||
if (envelope.isUnidentifiedSender()) {
|
|
||||||
this.source = content.getSender().getLegacyIdentifier();
|
|
||||||
this.sourceDevice = content.getSenderDevice();
|
|
||||||
}
|
|
||||||
if (content.getDataMessage().isPresent()) {
|
|
||||||
this.dataMessage = new JsonDataMessage(content.getDataMessage().get(), m);
|
|
||||||
}
|
|
||||||
if (content.getSyncMessage().isPresent()) {
|
|
||||||
this.syncMessage = new JsonSyncMessage(content.getSyncMessage().get(), m);
|
|
||||||
}
|
|
||||||
if (content.getCallMessage().isPresent()) {
|
|
||||||
this.callMessage = new JsonCallMessage(content.getCallMessage().get());
|
|
||||||
}
|
|
||||||
if (content.getReceiptMessage().isPresent()) {
|
|
||||||
this.receiptMessage = new JsonReceiptMessage(content.getReceiptMessage().get());
|
|
||||||
}
|
|
||||||
/* if (content.getTypingMessage().isPresent()) {
|
|
||||||
SignalServiceTypingMessage typingMessage = content.getTypingMessage().get();
|
|
||||||
this.typingAction = content.getTypingMessage().get();
|
|
||||||
}
|
|
||||||
*/ }
|
|
||||||
=======
|
|
||||||
this.typingMessage = content != null && content.getTypingMessage().isPresent()
|
this.typingMessage = content != null && content.getTypingMessage().isPresent()
|
||||||
? new JsonTypingMessage(content.getTypingMessage().get())
|
? new JsonTypingMessage(content.getTypingMessage().get())
|
||||||
: null;
|
: null;
|
||||||
|
@ -118,7 +82,6 @@ public class JsonMessageEnvelope {
|
||||||
this.callMessage = content != null && content.getCallMessage().isPresent()
|
this.callMessage = content != null && content.getCallMessage().isPresent()
|
||||||
? new JsonCallMessage(content.getCallMessage().get())
|
? new JsonCallMessage(content.getCallMessage().get())
|
||||||
: null;
|
: null;
|
||||||
>>>>>>> upstream/master
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public JsonMessageEnvelope(Signal.MessageReceived messageReceived) {
|
public JsonMessageEnvelope(Signal.MessageReceived messageReceived) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue