Room.IsSendingMessage event

Lync 2013

Raised when the signed in user has finished typing in the group chat room message typing area or Room.BeginSendMessage has been called and Room.IsOutgoingMessageFilterEnabled returns true.

Namespace:  Microsoft.Lync.Model.Room
Assembly:  Microsoft.Lync.Model (in Microsoft.Lync.Model.dll)

Public Event IsSendingMessage As EventHandler(Of RoomMessageEventArgs)
Dim instance As Room
Dim handler As EventHandler(Of RoomMessageEventArgs)

AddHandler instance.IsSendingMessage, handler

If a user finishes typing a message to be posted to a chat room, your application logic has a chance to review the pending post by catching the IsSendingMessage event and running filter or formatting logic against the message string. If the user's message passes your filter, then post the message to the room by calling SendFilteredMessage with the enumerator RoomMessageFilteringAction.Passed. If the message does not pass your filter, call SendFilteredMessage with the enumerator RoomMessageFilteringAction.Canceled. If the message passes your filter but you reformat the message or replace text, call the method with the RoomMessageFilteringAction.Replaced enumerator.