public void ParseMessageRecv(ProtocolTreeNode messageNode)
{
FMessage.Builder builder = new FMessage.Builder();
string tmpAttrbId = messageNode.GetAttribute("id");
string tmpAttrFrom = messageNode.GetAttribute("from");
string tmpAttrFromName = messageNode.GetAttribute("");
string tmpAttrFromJid = messageNode.GetAttribute("author") ?? "";
string tmpAttrType = messageNode.GetAttribute("type");
string tmpTAttribT = messageNode.GetAttribute("t");
long result = 0L;
if (!string.IsNullOrEmpty(tmpTAttribT) && long.TryParse(tmpTAttribT, out result))
{
builder.Timestamp(new DateTime?(WhatsConstants.UnixEpoch.AddSeconds((double)result)));
}
if ("error".Equals(tmpAttrType))
{
TypeError(messageNode, tmpAttrbId, tmpAttrFrom);
}
else if ("subject".Equals(tmpAttrType))
{
TypeSubject(messageNode, tmpAttrFrom, tmpAttrFromJid, tmpAttrbId, tmpTAttribT);
}
else if ("chat".Equals(tmpAttrType))
{
TypeChat(messageNode, tmpAttrFrom, tmpAttrbId, builder, tmpAttrFromJid);
}
else if ("notification".Equals(tmpAttrType))
{
TypeNotification(messageNode, tmpAttrFrom, tmpAttrbId);
}
}