【发布时间】:2016-09-20 00:17:56
【问题描述】:
嗨,如何向可写字段添加额外的字段以将其他内容传递给数据映射,例如,我希望能够传递图像的 url 从而允许图像共享,如何进行,主要是 js 开发,所以不是真的如何实现添加新功能以工作 sinch 服务器
public final class WritableMessage {
private static final int HEADER_MAX_SIZE = 1024;
private final String messageId;
private String textBody;
private string extraContent;// added here for passing img url
private List<String> recipientIds;
private Map<String, String> headers;
private int headerSize;
public WritableMessage(String recipientUserId, String textBody, extraContent) {
this();
this.addExtra(extraContent); // but the sinch doesnt allow overide
this.addRecipient(recipientUserId);
this.setTextBody(textBody);
}
【问题讨论】: