All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.whispersystems.signalservice.api.messages.SignalServiceReceiptMessage Maven / Gradle / Ivy

There is a newer version: 2.15.3_unofficial_107
Show newest version
package org.whispersystems.signalservice.api.messages;


import java.util.List;

public class SignalServiceReceiptMessage {

  public enum Type {
    UNKNOWN, DELIVERY, READ, VIEWED
  }

  private final Type       type;
  private final List timestamps;
  private final long       when;

  public SignalServiceReceiptMessage(Type type, List timestamps, long when) {
    this.type       = type;
    this.timestamps = timestamps;
    this.when       = when;
  }

  public Type getType() {
    return type;
  }

  public List getTimestamps() {
    return timestamps;
  }

  public long getWhen() {
    return when;
  }

  public boolean isDeliveryReceipt() {
    return type == Type.DELIVERY;
  }

  public boolean isReadReceipt() {
    return type == Type.READ;
  }

  public boolean isViewedReceipt() {
    return type == Type.VIEWED;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy