TelepathyIM / telepathy-qt

Telepathy Qt bindings
https://telepathy.freedesktop.org
GNU Lesser General Public License v2.1
25 stars 14 forks source link

Develop a specification of API to retrieve logs #8

Open Kaffeine opened 8 years ago

Kaffeine commented 8 years ago

API description

Use cases

Channel.Type.MessageArchive

Description

A channel type for logs retrieve. Inspired by Channel.Type.RoomList. Can be used to retrieve logs without opening channels for all possible targets.

Methods

GetMessages (a{sv} filter) -> void

Acceptable filter keys listed in FilterKeys property

Signals

MessagesReceived (aaa{sv}: array of Messages)

MessageHeader part:

Possible (optional) keys:

Objects implementing this interface must also implement: Channel.Type.Text and Channel.Interface.Messages.

Methods

GetMessages (a{sv} filter) -> void

Acceptable filter keys listed in FilterKeys property

Once the method is called, it emits Channel.Interface.Messages MessageReceived (aa{sv}: Message) signals for received scroll-back messages

Properties

FilterKeys — as

Possible (optional) keys:

Report on FreeDesktop.org

Exists API

XMPP

XEP-0136: Message Archiving XEP-0313: Message Archive Management

Telegram API

messages.getMessages#4222fa74 id:Vector<int> = messages.Messages;
messages.getDialogs#6b47f94d offset_date:int offset_id:int offset_peer:InputPeer limit:int = messages.Dialogs;
messages.getHistory#8a8ec2da peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
messages.deleteHistory#b7c13bd9 peer:InputPeer max_id:int = messages.AffectedHistory;
messages.deleteMessages#a5f18925 id:Vector<int> = messages.AffectedMessages;

https://core.telegram.org/method/messages.getHistory https://core.telegram.org/method/messages.deleteHistory https://core.telegram.org/method/messages.getDialogs https://core.telegram.org/method/messages.getMessages https://core.telegram.org/method/messages.deleteMessages