mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 01:06:50 +00:00
Don't assume destination account phone number exists when updating spam report metrics
This commit is contained in:
1 parent
c12206ace0
commit
4f4284d1cc
1 file changed
+3
-1
+3
-1
@@ -43,7 +43,9 @@ public class ReportedMessageMetricsListener implements ReportedMessageListener {
|
||||
Metrics.counter(REPORTED_COUNTER_NAME, COUNTRY_CODE_TAG_NAME, sourceCountryCode).increment();
|
||||
|
||||
accountsManager.getByAccountIdentifier(reporterUuid).ifPresent(reporter -> {
|
||||
final String destinationCountryCode = Util.getCountryCode(reporter.getNumber());
|
||||
final String destinationCountryCode = reporter.getNumberOptional()
|
||||
.map(Util::getCountryCode)
|
||||
.orElse("n/a");
|
||||
|
||||
logger.info(Markers.appendEntries(Map.of(
|
||||
"sourceCountry", sourceCountryCode,
|
||||
|
||||
Reference in new issue
Block a user