mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 13:36:47 +00:00
Fix a goof where the international unsealed sender country meter was incrementing unconditionally.
This commit is contained in:
1 parent
6bff564129
commit
0ee3f0a5b5
1 file changed
+4
-1
+4
-1
@@ -232,7 +232,10 @@ public class MessageController {
|
||||
if (source.isPresent() && !source.get().isFor(destinationName)) {
|
||||
rateLimiters.getMessagesLimiter().validate(source.get().getUuid() + "__" + destination.get().getUuid());
|
||||
|
||||
if (!Util.getCountryCode(source.get().getNumber()).equals(destination.get().getNumber())) {
|
||||
final String senderCountryCode = Util.getCountryCode(source.get().getNumber());
|
||||
final String destinationCountryCode = Util.getCountryCode(destination.get().getNumber());
|
||||
|
||||
if (!senderCountryCode.equals(destinationCountryCode)) {
|
||||
Metrics.counter(INTERNATIONAL_UNSEALED_SENDER_COUNTER_NAME, SENDER_COUNTRY_TAG_NAME, Util.getCountryCode(source.get().getNumber())).increment();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user