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

Loading…
Cancel
Save