mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Fix individual send metrics.
This commit is contained in:
committed by
Alex Hart
parent
f160e960be
commit
276e253fdf
@@ -232,10 +232,14 @@ public class MessageSender {
|
||||
Recipient recipient = message.getThreadRecipient();
|
||||
long messageId = database.insertMessageOutbox(applyUniversalExpireTimerIfNecessary(context, recipient, message, allocatedThreadId), allocatedThreadId, sendType != SendType.SIGNAL, insertListener);
|
||||
|
||||
if (message.getThreadRecipient().isGroup() && message.getAttachments().isEmpty() && message.getLinkPreviews().isEmpty() && message.getSharedContacts().isEmpty()) {
|
||||
SignalLocalMetrics.GroupMessageSend.onInsertedIntoDatabase(messageId, metricId);
|
||||
if (message.getThreadRecipient().isGroup()) {
|
||||
if (message.getAttachments().isEmpty() && message.getLinkPreviews().isEmpty() && message.getSharedContacts().isEmpty()) {
|
||||
SignalLocalMetrics.GroupMessageSend.onInsertedIntoDatabase(messageId, metricId);
|
||||
} else {
|
||||
SignalLocalMetrics.GroupMessageSend.cancel(messageId);
|
||||
}
|
||||
} else {
|
||||
SignalLocalMetrics.GroupMessageSend.cancel(metricId);
|
||||
SignalLocalMetrics.IndividualMessageSend.onInsertedIntoDatabase(messageId, metricId);
|
||||
}
|
||||
|
||||
sendMessageInternal(context, recipient, sendType, messageId, Collections.emptyList(), message.getScheduledDate() > 0);
|
||||
|
||||
Reference in New Issue
Block a user