mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-24 08:31:28 +00:00

1) Refactored MMS layer to use abstracted types. 2) Added support for retrieving attachment IDs.
46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package org.whispersystems.textsecure.push;
|
|
|
|
import java.util.LinkedList;
|
|
import java.util.List;
|
|
|
|
public class OutgoingPushMessage {
|
|
|
|
private List<String> destinations;
|
|
private String messageText;
|
|
private List<PushAttachmentPointer> attachments;
|
|
|
|
public OutgoingPushMessage(String destination, String messageText) {
|
|
this.destinations = new LinkedList<String>();
|
|
this.attachments = new LinkedList<PushAttachmentPointer>();
|
|
this.messageText = messageText;
|
|
this.destinations.add(destination);
|
|
}
|
|
|
|
public OutgoingPushMessage(List<String> destinations, String messageText) {
|
|
this.destinations = destinations;
|
|
this.messageText = messageText;
|
|
this.attachments = new LinkedList<PushAttachmentPointer>();
|
|
}
|
|
|
|
public OutgoingPushMessage(List<String> destinations, String messageText,
|
|
List<PushAttachmentPointer> attachments)
|
|
{
|
|
this.destinations = destinations;
|
|
this.messageText = messageText;
|
|
this.attachments = attachments;
|
|
}
|
|
|
|
public List<String> getDestinations() {
|
|
return destinations;
|
|
}
|
|
|
|
public String getMessageText() {
|
|
return messageText;
|
|
}
|
|
|
|
public List<PushAttachmentPointer> getAttachments() {
|
|
return attachments;
|
|
}
|
|
|
|
}
|