129 lines
4.0 KiB
Markdown
129 lines
4.0 KiB
Markdown
|
# Introduction
|
||
|
`NOT` is a command introduced with [MSNP5](../versions/msnp5.md).
|
||
|
|
||
|
It is a Notification Server command, WITH a response payload.
|
||
|
|
||
|
Used to send notifications ("alerts") to the client.
|
||
|
|
||
|
# Client/Request
|
||
|
This command can not be sent from the client.
|
||
|
|
||
|
# Server/Response
|
||
|
```
|
||
|
NOT length
|
||
|
payload
|
||
|
```
|
||
|
|
||
|
Where `length` is the size (in bytes) of the `payload`.
|
||
|
|
||
|
Where `payload` is a [`<NOTIFICATION>` document](../files/notification.md).
|
||
|
|
||
|
# Examples
|
||
|
|
||
|
## Basic notification
|
||
|
```
|
||
|
S: NOT 367
|
||
|
<NOTIFICATION ver="1" id="2" siteid="0" siteurl="http://example.com/">
|
||
|
<TO pid="0x00000001:0x00000002" name="example@hotmail.com" />
|
||
|
<MSG id="0">
|
||
|
<ACTION url="alert?command=action" />
|
||
|
<SUBSCR url="alert?command=change" />
|
||
|
<BODY lang="1033" icon="alerticon_32x32.png">
|
||
|
<TEXT>This is an example notification.</TEXT>
|
||
|
</BODY>
|
||
|
</MSG>
|
||
|
</NOTIFICATION>
|
||
|
```
|
||
|
|
||
|
## Advanced notification
|
||
|
*Since [MSNP9](../versions/msnp9.md).*
|
||
|
```
|
||
|
S: NOT 457
|
||
|
<NOTIFICATION ver="1" id="2" siteid="0" siteurl="http://example.com/">
|
||
|
<TO pid="0x00000001:0x00000002" name="example@hotmail.com" />
|
||
|
<MSG id="0">
|
||
|
<ACTION url="alert?command=action" />
|
||
|
<SUBSCR url="alert?command=change" />
|
||
|
<BODY lang="1033" icon="alerticon_32x32.png">
|
||
|
<TEXT>This is an example notification.</TEXT>
|
||
|
<TEXTX><P>This is an <B>extended</B> notification!</P></TEXTX>
|
||
|
</BODY>
|
||
|
</MSG>
|
||
|
</NOTIFICATION>
|
||
|
```
|
||
|
|
||
|
## Blog update notification
|
||
|
*Since [MSNP11](../versions/msnp11.md).*
|
||
|
```
|
||
|
S: NOT 1249
|
||
|
<NOTIFICATION id="2" siteid="45705" siteurl="http://storage.msn.com/">
|
||
|
<TO pid="0x00000001:0x00000002" name="example@hotmail.com">
|
||
|
<VIA agent="messenger"/>
|
||
|
</TO>
|
||
|
<MSG id="0">
|
||
|
<ACTION url="a.htm" />
|
||
|
<SUBSCR url="s.htm" />
|
||
|
<BODY>
|
||
|
<NotificationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||
|
<SpaceHandle>
|
||
|
<ResourceID>example1!101</ResourceID>
|
||
|
</SpaceHandle>
|
||
|
<ComponentHandle>
|
||
|
<ResourceID>example2!101</ResourceID>
|
||
|
</ComponentHandle>
|
||
|
<OwnerCID>4294967298</OwnerCID>
|
||
|
<LastModifiedDate>2024-10-26T09:33:27.1020000-08:00</LastModifiedDate>
|
||
|
<HasNewItem>true<HasNewItem>
|
||
|
<ComponentSummary>
|
||
|
<Component xsi:type="MessageContainer">
|
||
|
<ResourceID>example2!102</ResourceID>
|
||
|
</Component>
|
||
|
<Items>
|
||
|
<Component xsi:type="Message">
|
||
|
<ResourceID>example2!101</ResourceID>
|
||
|
</Component>
|
||
|
</Items>
|
||
|
</ComponentSummary>
|
||
|
</NotificationData>
|
||
|
</BODY>
|
||
|
</MSG>
|
||
|
</NOTIFICATION>
|
||
|
```
|
||
|
|
||
|
## Contact update notification
|
||
|
*Since [MSNP13](../versions/msnp13.md).*
|
||
|
```
|
||
|
S: NOT 685
|
||
|
<NOTIFICATION id="2" siteid="45705" siteurl="http://contacts.msn.com/">
|
||
|
<TO pid="0x00000001:0x00000002" name="example@hotmail.com">
|
||
|
<VIA agent="messenger"/>
|
||
|
</TO>
|
||
|
<MSG id="0">
|
||
|
<ACTION url="a.htm" />
|
||
|
<SUBSCR url="s.htm" />
|
||
|
<BODY>
|
||
|
<NotificationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||
|
<Service>ABCHInternal</Service>
|
||
|
<CID>4294967298</CID>
|
||
|
<LastModifiedDate>2024-10-26T09:33:27.1020000-08:00</LastModifiedDate>
|
||
|
<HasNewItem>false</HasNewItem>
|
||
|
</NotificationData>
|
||
|
</BODY>
|
||
|
</MSG>
|
||
|
</NOTIFICATION>
|
||
|
```
|
||
|
|
||
|
## Invalid context
|
||
|
*Inherited from being an unimplemented command.
|
||
|
```
|
||
|
C: NOT 1 0
|
||
|
```
|
||
|
|
||
|
Server disconnects client.
|
||
|
|
||
|
# Known changes
|
||
|
* [MSNP11](../versions/msnp11.md): Using an `<NotificationData>` sub-document embedded into a `<NOTIFICATION>` document is supported.
|
||
|
Using the new sub-document, live blog updates are now sent.
|
||
|
* [MSNP13](../versions/msnp13.md): Used for [Address Book Service](../services/abservice.md) live updates using the `<NotificationData>` sub-document.
|
||
|
* [MSNP18](../versions/msnp18.md): Used for live persistant chat group ("circle") updates using the `<NotificationData>` sub-document.
|