Skip to content

Commit

Permalink
Fix group info for json dbus messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AsamK committed Jan 16, 2021
1 parent 690ce28 commit c588130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/asamk/signal/json/JsonDataMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class JsonDataMessage {
public JsonDataMessage(Signal.MessageReceived messageReceived) {
timestamp = messageReceived.getTimestamp();
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
quote = null;
mentions = null;
Expand All @@ -80,7 +80,7 @@ public JsonDataMessage(Signal.MessageReceived messageReceived) {
public JsonDataMessage(Signal.SyncMessageReceived messageReceived) {
timestamp = messageReceived.getTimestamp();
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
quote = null;
mentions = null;
Expand Down

0 comments on commit c588130

Please sign in to comment.