public class QChatSendMessageParam
extends java.lang.Object
构造器和说明 |
---|
QChatSendMessageParam(long serverId,
long channelId,
MsgTypeEnum type) |
限定符和类型 | 方法和说明 |
---|---|
QChatMessageAntiSpamOption |
getAntiSpamOption()
获取消息反垃圾配置选项
|
java.lang.String |
getAttach()
获取消息附件字符串
|
java.lang.String |
getBody()
获取消息内容
|
java.lang.Long |
getChannelId()
获取频道id
|
java.lang.String |
getEnv()
获取环境变量
用户可以根据不同的env配置不同的抄送和回调地址
|
java.util.Map<java.lang.String,java.lang.Object> |
getExtension()
获取扩展字段
|
java.util.List<java.lang.String> |
getMentionedAccidList()
获取@账号列表
|
java.util.List<java.lang.Long> |
getMentionedRoleIdList()
设置@身份组的RoleId列表
|
java.lang.String |
getPushContent()
获取推送文案
|
java.util.Map<java.lang.String,java.lang.Object> |
getPushPayload()
获取推送payload
|
java.lang.Long |
getServerId()
获取服务器id
|
java.lang.Integer |
getServerStatus()
获取消息服务器状态
|
java.lang.Integer |
getSubType()
获取消息子类型
|
MsgTypeEnum |
getType()
获取消息类型
|
java.lang.String |
getUuid()
获取消息uuid
|
boolean |
isHistoryEnable()
是否消息在云端存储,默认true
|
boolean |
isMentionedAll()
是否@所有人
|
boolean |
isNeedBadge()
是否需要消息计数,默认true
|
boolean |
isNeedPushNick()
是否需要推送昵称,默认true
|
boolean |
isPushEnable()
是否需要推送,默认true
|
boolean |
isRouteEnable()
是否需要抄送,默认true
|
void |
setAntiSpamOption(QChatMessageAntiSpamOption antiSpamOption)
设置消息反垃圾配置选项
|
void |
setAttach(java.lang.String attach)
设置消息附件,通过MsgAttachment#toJson(false)获得
|
void |
setAttachment(MsgAttachment attachment)
设置消息附件
|
void |
setBody(java.lang.String body)
设置消息内容
|
void |
setEnv(java.lang.String env)
设置环境变量
用户可以根据不同的env配置不同的抄送和回调地址
|
void |
setExtension(java.util.Map<java.lang.String,java.lang.Object> extension)
设置扩展字段
|
void |
setHistoryEnable(boolean historyEnable)
设置是否消息是否存储云端历史
|
void |
setMentionedAccidList(java.util.List<java.lang.String> mentionedAccidList)
设置@账号列表
|
void |
setMentionedAll(boolean mentionedAll)
设置是否@所有人
|
void |
setMentionedRoleIdList(java.util.List<java.lang.Long> mentionedRoleIdList)
设置@身份组的RoleId列表
|
void |
setNeedBadge(boolean needBadge)
设置是否需要消息计数
|
void |
setNeedPushNick(boolean needPushNick)
设置是否需要推送昵称
|
void |
setPushContent(java.lang.String pushContent)
设置推送文案
|
void |
setPushEnable(boolean pushEnable)
设置是否需要推送
|
void |
setPushPayload(java.util.Map<java.lang.String,java.lang.Object> pushPayload)
设置推送payload
|
void |
setRouteEnable(boolean routeEnable)
设置是否需要抄送
|
void |
setServerStatus(java.lang.Integer serverStatus)
如果设置状态,状态只能设置成自定义的状态(status>= 10000),否则提示414参数错误
|
void |
setSubType(java.lang.Integer subType)
设置消息子类型
|
QChatMessage |
toQChatMessage()
将QChatSendMessageParam转换成QChatMessage
|
public QChatSendMessageParam(long serverId, long channelId, MsgTypeEnum type)
serverId
- 消息所属的serverIdchannelId
- 消息所属的channelIdtype
- 消息类型public void setBody(java.lang.String body)
body
- 消息内容public void setAttach(java.lang.String attach)
attach
- 消息附件public void setAttachment(MsgAttachment attachment)
attachment
- 消息附件类public void setExtension(java.util.Map<java.lang.String,java.lang.Object> extension)
extension
- public void setPushPayload(java.util.Map<java.lang.String,java.lang.Object> pushPayload)
pushPayload
- public void setPushContent(java.lang.String pushContent)
pushContent
- public void setMentionedAccidList(java.util.List<java.lang.String> mentionedAccidList)
mentionedAccidList
- public void setMentionedRoleIdList(java.util.List<java.lang.Long> mentionedRoleIdList)
mentionedRoleIdList
- public void setMentionedAll(boolean mentionedAll)
mentionedAll
- public void setHistoryEnable(boolean historyEnable)
historyEnable
- public void setPushEnable(boolean pushEnable)
pushEnable
- public void setNeedBadge(boolean needBadge)
needBadge
- public void setNeedPushNick(boolean needPushNick)
needPushNick
- public java.lang.Long getServerId()
public java.lang.Long getChannelId()
public MsgTypeEnum getType()
public java.lang.String getBody()
public java.lang.String getAttach()
public java.util.Map<java.lang.String,java.lang.Object> getExtension()
public java.util.Map<java.lang.String,java.lang.Object> getPushPayload()
public java.lang.String getPushContent()
public java.util.List<java.lang.String> getMentionedAccidList()
public java.util.List<java.lang.Long> getMentionedRoleIdList()
public boolean isMentionedAll()
public boolean isHistoryEnable()
public boolean isPushEnable()
public boolean isNeedBadge()
public boolean isNeedPushNick()
public java.lang.String getUuid()
public java.lang.Integer getServerStatus()
public void setServerStatus(java.lang.Integer serverStatus)
serverStatus
- public QChatMessageAntiSpamOption getAntiSpamOption()
public void setAntiSpamOption(QChatMessageAntiSpamOption antiSpamOption)
antiSpamOption
- public boolean isRouteEnable()
public void setRouteEnable(boolean routeEnable)
routeEnable
- public java.lang.String getEnv()
public void setEnv(java.lang.String env)
env
- 环境变量public java.lang.Integer getSubType()
public void setSubType(java.lang.Integer subType)
subType
- public QChatMessage toQChatMessage()