OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
689 stars 95 forks source link

Inserting Signature with the OnMessageSend event duplicates the signature #4758

Open barisbikmaz opened 3 months ago

barisbikmaz commented 3 months ago

Provide required information needed to triage your issue

When updating the signature in the mail body after the "OnMessageSend" event, the updated signature is inserted below the existing signature.

Your Environment

Expected behavior

When the OnMessageSend event is fired we are updating the signature in the mail body. We expect that Office.context.mailbox.item.body.setSignatureAsync replaces the existing signature.

Current behavior

If the mail already has already signature, setSignatureAsync inserts a new signature below the existing signature.

Steps to reproduce

  1. Create an Outlook manifest with OnMessageSend and OnNewMessageCompose events enabled
  2. Each time one of the events are called use the setSignatureAsync API to insert a signature
  3. Observe that the signature inserted by the OnMessageSend event is below the existing signature

Provide additional details

Context

We have an addin that inserts the signature at the "OnMessageSend" event to ensure that the organisational CI/CD guidelines are adhered to even if a user changes the signature manually. Currently we can only ensure this in Windows or Web environments.

Useful logs

image

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

anjalitp commented 3 months ago

Thanks for reporting this issue regarding Signature API. It has been put on our backlog. We unfortunately have no timelines to share at this point

Internal tracking Id: 4820115