Commit Graph

6 Commits

Author SHA1 Message Date
Andrea Maria Piana b9447aea36
Add replies, block contact, remove unused methods
This commit does a few things:
1) Add replies to messages, which are calculated at query time using a
join
2) Add a BlockContact api call that takes care of deleting messages from
a user, deleting the chat, and re-compute the denormalized values. As it
needs to run in a transaction, the method that it relies on take a
transaction as an optional parameter.
3) Change ID scheme for chats/contacts so that it's consistent across
messages/contacts

This is not compatible as I have modified a migration, but it's not a
problem as data compatibility can be broken
2019-08-20 08:54:10 +02:00
Adam Babik c2b7b022b7
move status-react compliant messages storage and API 2019-08-12 12:43:46 +02:00
Andrea Maria Piana baa579640f
Move contacts to status-protocol-go & add delete chat endpoint
Adds to api calls, Contacts() not paginated and SaveContact()

DeviceInfo and SystemTags have been stored as a blob to simplify
querying, although at some point we might want to query system tags (for
example to fetch all the blocked/added by us/added by them contacts),
but not a use case for now.
2019-08-04 22:06:05 +02:00
Andrea Maria Piana b742356b68
Add chats API calls
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).
2019-08-02 07:38:20 +02:00
Andrea Maria Piana 28b2244fed
Handle messages in raw method as well 2019-07-29 16:19:04 +02:00
Adam Babik 0a8bf4c10e
Consolidate databases and migrations (#36) 2019-07-27 14:27:31 +02:00