Fix group info for json dbus messages

This commit is contained in:
AsamK 2021-01-16 20:12:24 +01:00
parent 690ce2829f
commit c588130491

View file

@ -69,7 +69,7 @@ class JsonDataMessage {
public JsonDataMessage(Signal.MessageReceived messageReceived) { public JsonDataMessage(Signal.MessageReceived messageReceived) {
timestamp = messageReceived.getTimestamp(); timestamp = messageReceived.getTimestamp();
message = messageReceived.getMessage(); message = messageReceived.getMessage();
groupInfo = new JsonGroupInfo(messageReceived.getGroupId()); groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
reaction = null; // TODO Replace these 4 with the proper commands reaction = null; // TODO Replace these 4 with the proper commands
quote = null; quote = null;
mentions = null; mentions = null;
@ -80,7 +80,7 @@ class JsonDataMessage {
public JsonDataMessage(Signal.SyncMessageReceived messageReceived) { public JsonDataMessage(Signal.SyncMessageReceived messageReceived) {
timestamp = messageReceived.getTimestamp(); timestamp = messageReceived.getTimestamp();
message = messageReceived.getMessage(); message = messageReceived.getMessage();
groupInfo = new JsonGroupInfo(messageReceived.getGroupId()); groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
reaction = null; // TODO Replace these 4 with the proper commands reaction = null; // TODO Replace these 4 with the proper commands
quote = null; quote = null;
mentions = null; mentions = null;