# BlockedMessageInfo

public class BlockedMessageInfo

含有敏感词消息被拦截的信息类

#### Author

yanke on 2021/7/12

#### See also

io.rong.imlib.IRongCoreListener.MessageBlockListener

## Properties

blockMsgUId
Link copied to clipboard
public String blockMsgUId
被拦截的消息ID
channelId
Link copied to clipboard
public String channelId
频道ID
conversationType
Link copied to clipboard
public ConversationType conversationType
会话类型
CREATOR
Link copied to clipboard
public final static Creator<BlockedMessageInfo> CREATOR
extra
Link copied to clipboard
public String extra
附加信息
sourceContent
Link copied to clipboard
public String sourceContent
源内容。sourceType=1/2时返回；1扩展内容，2消息内容 目前只支持超级群*
sourceType
Link copied to clipboard
public int sourceType
消息源触发类型。0 默认，原始消息；1 消息扩展；2 消息修改 目前只支持超级群*
targetId
Link copied to clipboard
public String targetId
会话ID
type
Link copied to clipboard
public MessageBlockType type
拦截原因

## Functions

describeContents
Link copied to clipboard
public int describeContents()
getBlockMsgUId
Link copied to clipboard
public String getBlockMsgUId()
获取被拦截消息的唯一 Id.
getChannelId
Link copied to clipboard
public String getChannelId()
getConversationType
Link copied to clipboard
public ConversationType getConversationType()
获取被拦截消息所在会话的会话类型。
getExtra
Link copied to clipboard
public String getExtra()
获取被拦截消息的附加信息。
getSourceContent
Link copied to clipboard
public String getSourceContent()
getSourceType
Link copied to clipboard
public int getSourceType()
getTargetId
Link copied to clipboard
public String getTargetId()
获取被拦截消息所在会话的会话 Id。
getType
Link copied to clipboard
public MessageBlockType getType()
获取消息被拦截的原因。MessageBlockType
obtain
Link copied to clipboard
public static BlockedMessageInfo obtain(ConversationType conversationType, String targetId, String blockMsgUId, MessageBlockType type, String extra)
public static BlockedMessageInfo obtain(ConversationType conversationType, String targetId, String blockMsgUId, MessageBlockType type, String channelId, String extra)
public static BlockedMessageInfo obtain(ConversationType conversationType, String targetId, String blockMsgUId, MessageBlockType type, String channelId, String extra, int sourceType, String sourceContent)
setSourceContent
Link copied to clipboard
public void setSourceContent(String sourceContent)
setSourceType
Link copied to clipboard
public void setSourceType(int sourceType)
toString
Link copied to clipboard
public String toString()
writeToParcel
Link copied to clipboard
public void writeToParcel(Parcel dest, int flags)