Message operations

message/copy

URL: https://fleep.io/api/message/copy/CONV_ID

Copy message from another chat.

Input:

message_nr              bigint          -- number of pinned message
to_conv_id              text            -- destination conv
from_message_nr         bigint = null   -- used to return next batch of changes

Output:

conversation/sync - if from_message_nr is provided then normal
forward sync otherwise only conversation state and added message

message/delete

URL: https://fleep.io/api/message/delete/CONV_ID

Send message to flow.

Input:

message_nr          bigint          - number of edited message
attachment_id       text = None     - delete only given attachment
from_message_nr     bigint = None   - used to return next batch of changes

Output:

conversation/sync - if from_message_nr is provided then normal
forward sync otherwise only conversation state and added message

message/edit

URL: https://fleep.io/api/message/edit/CONV_ID

Send message to flow.

Input:

message             text            - message content
message_nr          bigint          - number of edited message
from_message_nr     bigint = None   - used to return next batch of changes
attachments         list = None     - list of AttachmentInfo objects to be added

Output:

conversation/sync - if from_message_nr is provided then normal
forward sync otherwise only conversation state and added message

message/mark_read

URL: https://fleep.io/api/message/mark_read/CONV_ID

Set conversation read horizon for this account. Used when client determines that it has shown messages to user for long enough for them to get read or user wants to move read horizon up again.

Input:

message_nr          bigint          - client read horizon. Last message number that we have
                                      shown to user. We update database and send
                                      notifications to other connected clients if it is
                                      larger than current value in database
from_message_nr     bigint = None   - used to return next batch of changes

Output:

conversation/sync - if from_message_nr is provided then normal
forward sync otherwise only conversation state and added message

message/mark_unread

URL: https://fleep.io/api/message/mark_unread/CONV_ID

Used for marking conversation as unread, ie moving read horizon back in message flow.

Input:

message_nr          bigint          - Number of first unread message
from_message_nr     bigint = None   - used to return next batch of changes

Output:

conversation/sync - if from_message_nr is provided then normal
forward sync otherwise only conversation state and added message

message/send

URL: https://fleep.io/api/message/send/CONV_ID

Send message to flow.

Input:

message             text = None     - message content
from_message_nr     bigint = None   - used to return next batch of changes
attachments         list = None     - list of attachment urls
is_retry            boolean = None  - Client is retrying same message send n'th time
                                      Will fail if from_message_nr != last_message_nr

Output:

conversation/sync - if from_message_nr is provided then normal
forward sync otherwise only conversation state and added message

message/store

URL: https://fleep.io/api/message/store/CONV_ID

Store message changes whatever they are. Do changes in local cache and send only changed fields.

Input:

message_nr              bigont = None   - message nr for edits and deletes
subject                 text = None     - message (email) subject
message                 text = None     - message content
attachments             text[] = None   - list of attachment urls
tags                    text[] = None   - list of tags for message
                                            pin - pinned message
                                            is_todo - task incomplete
                                            is_done - done task
                                            is_separator - task separator
                                            is_deleted - message deleted
                                            is_archived - pin or task archived
pin_weight              float = None    - Used for sorting
assignee_ids            uuid[] = None   - Assignees for task or message
client_req_id           text            - CrapNet id for message
from_message_nr         bigint = None   - used to return next batch of changes
is_retry                boolean = None  - Client is retrying same message send n'th time
                                          Will fail if from_message_nr != last_message_nr
is_url_preview_disabled boolean = None  - Disable generating url previews for this message
                                          and remove if generated
fwd_conversation_id     text = None     - Forwarded conversation id (for forwarding html messages)
fwd_message_nr          bigint = None   - Forwarded message nr (for forwarding html messages)

Output:

conversation/sync - if from_message_nr is provided then normal
forward sync otherwise only conversation state and added message