Beispiel #1
0
        override protected IEnumerable <XElement> getSpecificNewMessageData(WebContext context)
        {
            Post post = this.url.post;

            string quoted = context.httprequest.Form["data"];

            if (quoted != null)
            {
                quoted = quoted.Trim();
            }
            if (quoted == null || quoted == "")
            {
                if (post.revision.HasValue)
                {
                    quoted = UBBParser.StripQuotes(post.latestRevision.body).Trim();
                }
            }

            return(new XElement[] {
                new XElement("currentLocation", post.exportToXmlSimpleWithParent(context)),
                post.thread.board.exportToXml(context, Board.SubboardsOptions.None),
                post.thread.exportToXml(context),
                post.exportToXml(context),
                post.thread.board.exportLayersInfoForUser(context),
                new XElement("quoted", quoted),
            });
        }
Beispiel #2
0
        override protected IEnumerable <XElement> getSpecificNewMessageData(WebContext context)
        {
            Post    post     = this.url.post;
            Account receiver = Account.LoadByUser(post.poster);

            if (receiver.needsMigration)
            {
                throw new ApplicationException("User is not migrated");
            }

            string quoted = context.httprequest.Form["data"];

            if (quoted != null)
            {
                quoted = quoted.Trim();
            }
            if (quoted == null || quoted == "")
            {
                if (post.revision.HasValue)
                {
                    quoted = UBBParser.StripQuotes(post.latestRevision.body).Trim();
                }
            }

            return(new XElement[] {
                new XElement("currentLocation", post.exportToXmlSimpleWithParent(context)),
                post.thread.board.exportToXml(context, Board.SubboardsOptions.None),
                post.thread.exportToXml(context),
                post.exportToXml(context),
                new XElement("receiver", receiver.exportToXml(context)),
                new XElement("quoted", quoted),
            });
        }
Beispiel #3
0
        override protected IEnumerable <XElement> getSpecificNewMessageData(WebContext context)
        {
            PMMessage message = this.url.pm;
            string    quoted  = UBBParser.StripQuotes(message.bodyUBB).Trim();

            return(new XElement[] {
                message.exportToXml(context),
                new XElement("quoted", quoted),
            });
        }