byte[] HandleAddNotice(Dictionary <string, object> request) { Dictionary <string, object> result = new Dictionary <string, object>(); if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("NoticeID") || !request.ContainsKey("FromName") || !request.ContainsKey("Subject") || !request.ContainsKey("Message") || !request.ContainsKey("HasAttachment")) { NullResult(result, "Bad network data"); } else { bool hasAtt = bool.Parse(request["HasAttachment"].ToString()); byte attType = 0; string attName = string.Empty; string attOwner = string.Empty; UUID attItem = UUID.Zero; if (request.ContainsKey("AttachmentType")) { attType = byte.Parse(request["AttachmentType"].ToString()); } if (request.ContainsKey("AttachmentName")) { attName = request["AttachmentName"].ToString(); } if (request.ContainsKey("AttachmentItemID")) { attItem = new UUID(request["AttachmentItemID"].ToString()); } if (request.ContainsKey("AttachmentOwnerID")) { attOwner = request["AttachmentOwnerID"].ToString(); } bool success = m_GroupsService.AddGroupNotice(request["RequestingAgentID"].ToString(), new UUID(request["GroupID"].ToString()), new UUID(request["NoticeID"].ToString()), request["FromName"].ToString(), request["Subject"].ToString(), request["Message"].ToString(), hasAtt, attType, attName, attItem, attOwner); result["RESULT"] = success.ToString(); } string xmlString = ServerUtils.BuildXmlResponse(result); //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); return(Util.UTF8NoBomEncoding.GetBytes(xmlString)); }
public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) { return(m_GroupsService.AddGroupNotice(RequestingAgentID, groupID, noticeID, fromName, subject, message, hasAttachment, attType, attName, attItemID, attOwnerID)); }