setAttachment method

void setAttachment(
  1. NIMMessageAttachment attachment
)

推荐使用此接口设置附件

Implementation

void setAttachment(NIMMessageAttachment attachment) {
  attach = jsonEncode(attachment.toMap());
}