// Token: 0x06002FBA RID: 12218 RVA: 0x0011564C File Offset: 0x0011384C
        public static Markup GetBodyFormatOfEditItem(Item item, NewItemType newItemType, UserOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            if (newItemType == NewItemType.New || newItemType == NewItemType.ImplicitDraft)
            {
                return(options.ComposeMarkup);
            }
            Body body = item.Body;

            if (OwaContext.Current.UserContext.IsIrmEnabled && Utilities.IsIrmRestrictedAndDecrypted(item))
            {
                return(Markup.Html);
            }
            if (body.Format == BodyFormat.TextPlain)
            {
                return(Markup.PlainText);
            }
            return(Markup.Html);
        }
        // Token: 0x06002FBE RID: 12222 RVA: 0x00115A4C File Offset: 0x00113C4C
        public static bool GenerateEditableMessageBodyAndRenderInfobarMessages(Item item, TextWriter writer, NewItemType newItemType, OwaContext owaContext, ref bool shouldPromptUserOnFormLoad, ref bool hasInlineImages, Infobar infobar, bool allowWebBeacon, Markup markup)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            if (owaContext == null)
            {
                throw new ArgumentNullException("context");
            }
            UserContext userContext = owaContext.UserContext;
            OwaSafeHtmlOutboundCallbacks owaSafeHtmlOutboundCallbacks = null;
            WebBeaconFilterLevels        filterWebBeaconsAndHtmlForms = userContext.Configuration.FilterWebBeaconsAndHtmlForms;
            bool flag = false;

            if (item != null)
            {
                flag = JunkEmailUtilities.IsJunkOrPhishing(item, false, userContext);
                if (!flag)
                {
                    if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.DisableFilter || allowWebBeacon || (!Utilities.IsPublic(item) && Utilities.IsWebBeaconsAllowed(item)))
                    {
                        owaSafeHtmlOutboundCallbacks = new OwaSafeHtmlAllowWebBeaconCallbacks(item, userContext.IsPublicLogon, owaContext, true);
                    }
                    else if (filterWebBeaconsAndHtmlForms != WebBeaconFilterLevels.DisableFilter && (newItemType == NewItemType.Reply || newItemType == NewItemType.Forward || newItemType == NewItemType.ExplicitDraft || newItemType == NewItemType.PostReply) && !allowWebBeacon)
                    {
                        owaSafeHtmlOutboundCallbacks = new OwaSafeHtmlRemoveWebBeaconCallbacks(item, userContext.IsPublicLogon, owaContext, true);
                    }
                    else
                    {
                        owaSafeHtmlOutboundCallbacks = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, false, owaContext, true);
                    }
                }
                else
                {
                    owaSafeHtmlOutboundCallbacks = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, true, owaContext, true);
                }
            }
            if (flag)
            {
                markup = Markup.PlainText;
            }
            BodyConversionUtilities.RenderComposeBody(writer, item, owaSafeHtmlOutboundCallbacks, userContext, markup);
            if (owaSafeHtmlOutboundCallbacks != null)
            {
                hasInlineImages = owaSafeHtmlOutboundCallbacks.HasInlineImages;
            }
            if (item != null)
            {
                if (!flag && (owaSafeHtmlOutboundCallbacks.HasBlockedImages || owaSafeHtmlOutboundCallbacks.HasBlockedForms))
                {
                    if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.UserFilterChoice)
                    {
                        shouldPromptUserOnFormLoad = true;
                    }
                    else if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.ForceFilter)
                    {
                        infobar.AddMessage(SanitizedHtmlString.FromStringId(-1196115124), InfobarMessageType.Informational, "divIbImg");
                    }
                }
                if (owaSafeHtmlOutboundCallbacks.HasRtfEmbeddedImages)
                {
                    infobar.AddMessage(1338319428, InfobarMessageType.Informational);
                }
                if (!ObjectClass.IsCalendarItemCalendarItemOccurrenceOrRecurrenceException(item.ClassName))
                {
                    return(owaSafeHtmlOutboundCallbacks.ApplyAttachmentsUpdates(item));
                }
            }
            return(false);
        }
 protected bool ShouldAddSignatureToBody(Markup bodymarkup, NewItemType newitemType)
 {
     return(base.UserContext.IsFeatureEnabled(Feature.Signature) && base.UserContext.UserOptions.AutoAddSignature);
 }