worked around rare npe
This commit is contained in:
parent
5992d4ac00
commit
96bbd16ca5
|
@ -73,14 +73,21 @@ public class Message extends AbstractEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Message(Conversation conversation, String body, int encryption, int status) {
|
public Message(Conversation conversation, String body, int encryption, int status) {
|
||||||
this(java.util.UUID.randomUUID().toString(), conversation.getUuid(),
|
this(java.util.UUID.randomUUID().toString(),
|
||||||
conversation.getContactJid().toBareJid(), null, body, System
|
conversation.getUuid(),
|
||||||
.currentTimeMillis(), encryption,
|
conversation.getContactJid() == null ? null : conversation.getContactJid().toBareJid(),
|
||||||
status, TYPE_TEXT, null, null);
|
null,
|
||||||
|
body,
|
||||||
|
System.currentTimeMillis(),
|
||||||
|
encryption,
|
||||||
|
status,
|
||||||
|
TYPE_TEXT,
|
||||||
|
null,
|
||||||
|
null);
|
||||||
this.conversation = conversation;
|
this.conversation = conversation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Message(final String uuid, final String conversationUUid, final Jid counterpart,
|
private Message(final String uuid, final String conversationUUid, final Jid counterpart,
|
||||||
final Jid trueCounterpart, final String body, final long timeSent,
|
final Jid trueCounterpart, final String body, final long timeSent,
|
||||||
final int encryption, final int status, final int type, final String remoteMsgId, final String relativeFilePath) {
|
final int encryption, final int status, final int type, final String remoteMsgId, final String relativeFilePath) {
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
|
|
Loading…
Reference in a new issue