Message Drafts
Because of being cross-platform, River makes it possible to type text into message fields through message drafts, so that it will be synced immediately in all of user's devices.
Drafts
DraftMessage constructor will render drafts.
Parameters:
Name | Type | Description |
---|---|---|
PeerID | int | |
PeerType | int | |
Date | int | |
Body | string | |
Entities | MessageEntity | |
ReplyTo | int | |
EditedId | int |
Saving drafts
To save drafts, the MessagesSaveDraft method will be called.
Parameters:
Name | Type | Description |
---|---|---|
Peer | InputPeer | |
ReplyTo | int | |
Body | string | |
Entities | MessageEntity | |
EditedID | int |
Downloading drafts
When UpdateDraftMessage updates, the new typed draft will automatically send to all user's devices including iOS, Web, Desktop, or ... .
Parameters:
Name | Type | Description |
---|---|---|
UCount | int | |
UpdateID | int | |
Message | DraftMessage |
Dialog objects fetched via the API also contain the draft associated with the dialog.
Clearing drafts
While the user sends messages using messages.sendMessege, or manually delete the text, a Peer parameter will be passed by MessagesClearDraft. As a result, Drafts will be cleared.