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
667 stars 94 forks source link

onMessageSendHandler event not firing #4556

Closed skunath closed 1 month ago

skunath commented 2 months ago

I have been trying to integrate onMessageSend handling into an addin and have been unable to ever see an event actually triggered. I've replicated the project as described in https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough?tabs=jsonmanifest

I can get a compose event handler to work. But have had no luck with send events. Nothing appears to load or run for those.

Your Environment

Expected behavior

An alert would pop up when hitting onsend.

Current behavior

Message sending is uninterrupted and no event is triggered.

Steps to reproduce

  1. Create a new addin using yo
  2. Follow the documentation here: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough?tabs=jsonmanifest
  3. Install the manifest on an exchange instance
  4. login with a user with the addin and watch

Link to live example(s)

Provide additional details

When installing the addin in exchange it does note that the add in should have an onsend event.

Context

The office documentation is difficult to track through as much of it seems contradictory. I've tried to follow the documentation as best as I can and have had no luck.

Useful logs

kumarshrey-msft commented 1 month ago

Hi @skunath, apologies for the delayed response. Are you still facing this issue? If yes, can you please confirm whether you are trying a JSON-based manifest or an XML one? Additionally, can you share the add-in's manifest and handler function?

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.