Use message timestamp for empty messages

pull/566/head
Beaudan Brown 6 years ago
parent 638f1c0e6c
commit 8cf90ae85d

@ -858,7 +858,8 @@ class LokiPublicChannelAPI {
receivedAt,
isPublic: true,
message: {
body: adnMessage.text,
// == to compare string and number
body: adnMessage.text == timestamp ? '' : adnMessage.text,
attachments,
group: {
id: this.conversationId,
@ -962,7 +963,7 @@ class LokiPublicChannelAPI {
// create a message in the channel
async sendMessage(data, messageTimeStamp) {
const { quote, attachments, preview } = data;
const text = data.body;
const text = data.body || messageTimeStamp.toString();
const attachmentAnnotations = attachments.map(
LokiPublicChannelAPI.getAnnotationFromAttachment
);

Loading…
Cancel
Save