1 package com.netease.nimlib.sdk.msg.model;
3 import android.text.TextUtils;
10 import java.io.Serializable;
14 private final String sessionId;
18 private final long time;
20 private final long serverId;
23 this.sessionId = sessionId;
24 this.sessionType = sessionTypeEnum;
26 this.serverId = serverId;
30 this.time = Long.parseLong(msg.get(ITalkService.Tag.time));
31 this.serverId = Long.parseLong(msg.get(ITalkService.Tag.msgid_server));
33 String receiverType = msg.get(ITalkService.Tag.ReceiverType);
34 String toAccount = msg.get(ITalkService.Tag.ReceiverAccount);
35 String fromAccount = msg.get(ITalkService.Tag.fromAccount);
36 switch (receiverType){
40 this.sessionId = toAccount;
45 final String myAccId = SDKCache.getAccount();
46 this.sessionId = (myAccId != null && myAccId.equals(fromAccount)) ? toAccount : fromAccount;
69 return String.format(
"{sessionId: %s, sessionType: %s, time: %s, serverId: %s}", sessionId, sessionType, time, serverId);
SessionTypeEnum getSessionType()
RoamMsgHasMoreOption(Property msg)
RoamMsgHasMoreOption(String sessionId, SessionTypeEnum sessionTypeEnum, long time, long serverId)