mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 02:08:40 +00:00
1) In addition to the Recipient interface, there is now RecipientDevice. A Recipient can have multiple corresponding RecipientDevices. All addressing is done to a Recipient, but crypto sessions and transport delivery are done to RecipientDevice. 2) The Push transport handles the discovery and session setup of additional Recipient devices. 3) Some internal rejiggering of Groups.
32 lines
631 B
Java
32 lines
631 B
Java
package org.whispersystems.textsecure.storage;
|
|
|
|
public class RecipientDevice {
|
|
|
|
public static final int DEFAULT_DEVICE_ID = 1;
|
|
|
|
private final long recipientId;
|
|
private final int deviceId;
|
|
|
|
public RecipientDevice(long recipientId, int deviceId) {
|
|
this.recipientId = recipientId;
|
|
this.deviceId = deviceId;
|
|
}
|
|
|
|
public long getRecipientId() {
|
|
return recipientId;
|
|
}
|
|
|
|
public int getDeviceId() {
|
|
return deviceId;
|
|
}
|
|
|
|
public CanonicalRecipient getRecipient() {
|
|
return new CanonicalRecipient() {
|
|
@Override
|
|
public long getRecipientId() {
|
|
return recipientId;
|
|
}
|
|
};
|
|
}
|
|
}
|