Beispiel #1
0
            protected void NewsReplyWithIssue()
            {
                new ResourceProxy(_resource, JobPriority.Lowest).DeletePropAsync(Core.Props.IsUnread);

                string sSubj = _resource.GetPropText(Core.Props.Subject);

                if (sSubj.StartsWith("Re: ", true, CultureInfo.CurrentUICulture))
                {
                    sSubj = sSubj.Substring(3);
                }
                sSubj = "Re: " + sSubj;

                // Construct the issue url: take the project URI and replace the project key with issue key in it
                string sIssueUri = _submission.Project.Uri;

                sIssueUri  = sIssueUri.Substring(0, sIssueUri.Length - _submission.Project.Key.Length);
                sIssueUri += _submission.Issue.key;

                string sTemplate = JiffaSettings.Template;

                sTemplate = sTemplate.Replace("<%=IssueUri%>", sIssueUri);

                IResourceList resGroups = _resource.GetLinksFromLive("NewsGroup", "Newsgroups");

                EditMessageForm.EditAndPostMessage(resGroups, sSubj, sTemplate, _resource.GetPropText("ArticleId"), false);
            }
        public async Task <ActionResult> EditMessage(EditMessageForm form)
        {
            try
            {
                await _service.EditMessage(form.Id, form.Token, form.IdMess, form.Data);

                return(Ok());
            }
            catch (Exception e)
            {
                return(StatusCode(215, e.Message));
            }
        }