The first one behaves like an upsert.
The second takes two parameters, from, to and returns chats in reverse
order by timestamp.
Members and MembershipUpdates have been stored as blob of data to
simplify the querying (we never query them separately).
I have changed the Chat type from interface to a concrete type, the most relevant change is that ID is now a string , for one-to-one it should be set to the hexencoded public key of the user, the chat-name for public chats, and uuid+pk-of-creator for private group chats, in order to be consistent with status-react.
We append the type in the database to avoid having cases where a public-chat name is the same as a public pk for example.
I will test this against status-react/status-console-client before merging, so please don't merge, but it would be useful to get some feedback, thanks!
This commits adds two API calls:
SaveChat GetChats
The first one behaves like an upsert. The second takes two parameters, from, to and returns chats in reverse order by timestamp.
Members and MembershipUpdates have been stored as blob of data to simplify the querying (we never query them separately).
I have changed the
Chat
type from interface to a concrete type, the most relevant change is thatID
is now a string , for one-to-one it should be set to the hexencoded public key of the user, the chat-name for public chats, and uuid+pk-of-creator for private group chats, in order to be consistent with status-react. We append the type in the database to avoid having cases where a public-chat name is the same as a public pk for example.I will test this against status-react/status-console-client before merging, so please don't merge, but it would be useful to get some feedback, thanks!