private bool doSceneEx(AppMsgSouce source) { AppMsgInfo info = AppMsgMgr.ParseAppXml(this.mAppMsg.strMsg); if (info == null) { Log.e("NetSceneSendAppMsg", "invalid AppMsgInfo, msg.strMsg = " + this.mAppMsg.strMsg); return(false); } base.beginBuilder(); base.mBuilder.BaseRequest = NetSceneBase.makeBaseRequest(0); AppMsg.Builder builder = AppMsg.CreateBuilder(); builder.AppId = info.appid; uint result = 0; builder.SdkVersion = uint.TryParse(info.sdkVer, out result) ? result : 0; builder.ToUserName = this.mAppMsg.strTalker; //if (info.fromUserName != AccountMgr.curUserName) //{ // Log.e("NetSceneSendAppMsg", "invalid from username = "******"appmsg") ?? ""; if (info.showtype == 2) { builder.Content = builder.Content + AppMsgMgr.getXmlNodeString(this.mAppMsg.strMsg, "ShakePageResult"); } if (string.IsNullOrEmpty(builder.Content)) { Log.e("NetSceneSendAppMsg", "invalid appmsgBuilder.Content = " + builder.Content); return(false); } builder.CreateTime = (uint)this.mAppMsg.nCreateTime; builder.ClientMsgId = this.mAppMsg.strClientMsgId; byte[] inBytes = null;//StorageIO.readFromFile(ChatMsgMgr.getMsgThumbnail(this.mAppMsg)); if (inBytes != null) { builder.Thumb = Util.toSKBuffer(inBytes); } builder.Source = (int)source; base.mBuilder.Msg = builder.Build(); base.mSessionPack.mCmdID = 0x6b; base.endBuilder(); return(true); }
public bool doScene(ChatMsg msg, AppMsgSouce source) { this.mAppMsg = msg; return(this.doSceneEx(source)); }