mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 04:26:53 +00:00
Throw a MismatchedDevicesException for empty message lists to support iOS clients
This commit is contained in:
1 parent
3af2cc5c70
commit
01258de560
2 files changed
+21
-1
No files matched your search
@@ -344,4 +344,19 @@ class MessageSenderTest {
|
||||
Optional.of(new MismatchedDevices(Set.of(primaryDeviceId), Set.of(extraDeviceId), Set.of(linkedDeviceId))))
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
void sendMessageEmptyMessageList() {
|
||||
final Device device = mock(Device.class);
|
||||
when(device.getId()).thenReturn(Device.PRIMARY_ID);
|
||||
|
||||
final Account account = mock(Account.class);
|
||||
when(account.getDevices()).thenReturn(List.of(device));
|
||||
|
||||
assertThrows(MismatchedDevicesException.class, () -> messageSender.sendMessages(account,
|
||||
new AciServiceIdentifier(UUID.randomUUID()),
|
||||
Collections.emptyMap(),
|
||||
Collections.emptyMap(),
|
||||
null));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user