Protocols/MSNP/Activities/SDK/Techref/Flags/ReplaceIM: Difference between revisions
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- Generated @ 08/12/2022 23:45:48 +01:00 using Anima's CHM converter based on techref/flags/ReplaceIM.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= Permission Flags - ReplaceIM = | __NOTOC__= Permission Flags - ReplaceIM = |
Latest revision as of 22:45, 12 August 2022
Permission Flags - ReplaceIM
If an application has the ReplaceIM flag enabled in the MSN® Messenger Activity directory, then the Channel object will have an additional event, OnIMReceived, an additional read-write property, IM, and an additional method, SendIMAsUser.
The OnIMReceived event is fired when an instant message is received.
The IM property is a read-write string that contains the original instant message. By writing to this property, the message can be modified before it is displayed. The message, possibly with modifications made during processing by the OnIMReceived event handler, is displayed in the Messenger Chat History window. The message can no longer be modified, once the OnIMReceived event is finished.
The SendIMAsUser method sends an instant message that appears as if the user had typed the message and pressed ENTER.
An application must be able to demonstrate a need for the ability to send messages as the user, and not just as the application, to be considered for this permission flag.
This permission flag might be useful for translation software, which might dynamically replace the contents of an incoming message with the translated version of that message.