NIMSDK-AOS  9.19.0
QChatReplyMessageParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
3 import androidx.annotation.NonNull;
5 
6 /**
7  * "回复消息"接口入参
8  */
9 public class QChatReplyMessageParam {
10 
11  /**
12  * 待发送消息体
13  */
14  @NonNull
15  private final QChatMessage message;
16  /**
17  * 被回复消息体
18  */
19  @NonNull
20  private final QChatMessage replyMessage;
21  /**
22  * 是否重发
23  */
24  private boolean resend = false;
25 
26  /**
27  *
28  * @param sendMessageParam 待发送的消息参数
29  * @param replyMessage 被回复消息体
30  */
31  public QChatReplyMessageParam(@NonNull QChatSendMessageParam sendMessageParam, @NonNull QChatMessage replyMessage) {
32  this.message = sendMessageParam.toQChatMessage();
33  this.replyMessage = replyMessage;
34  }
35 
36  /**
37  *
38  * @param message 待发送的消息体
39  * @param replyMessage 被回复消息体
40  * @param resend 如果是发送失败后重发,标记为true,否则填false
41  */
42  public QChatReplyMessageParam(@NonNull QChatMessage message, @NonNull QChatMessage replyMessage, boolean resend) {
43  this.message = message;
44  this.replyMessage = replyMessage;
45  this.resend = resend;
46  }
47 
48  @NonNull
50  return message;
51  }
52 
53  @NonNull
55  return replyMessage;
56  }
57 
58  public boolean isResend() {
59  return resend;
60  }
61 }
QChatReplyMessageParam(@NonNull QChatSendMessageParam sendMessageParam, @NonNull QChatMessage replyMessage)
QChatReplyMessageParam(@NonNull QChatMessage message, @NonNull QChatMessage replyMessage, boolean resend)