238 Commits

Author SHA1 Message Date
Sale Djenic
698c32f3e3 chore: UpdateKeycardUID function exposed 2022-09-21 15:01:53 +02:00
Pascal Precht
9ee2967e78 feat(message_persistence): add discord message author image payload fields
This also adds some persistence APIs to operate on the new field (later
needed for the discord imoprt tool)
2022-09-19 13:47:16 +02:00
Stefan
5b0d8a7c4e fix: workaround for wrong renaming of migration file for keypairs table
Restore the old, previously renamed, 1662447680_add_keypairs_table.up.sql
file while keeping the current one for those who already migrated to the
new one. The extra migration is noop and saves to keep consistency in
the user data states history.
2022-09-16 12:52:01 +02:00
frank
6e4ac1c495 Use image server for all kind of images and integrate identity rings 2022-09-16 09:52:08 +01:00
Stefan
9db69df9a0 feat: updated migrations for merging favourites with saved addresses
Required by #6546
2022-09-12 13:46:04 +02:00
Sale Djenic
00aa103788 feat: keypairs table added and necessary endpoints exposed via accounts api 2022-09-12 09:52:22 +02:00
Sale Djenic
41f3a19a49 feat: key_uid column added to the accounts table 2022-09-12 08:51:15 +02:00
Patryk Osmaczko
65be6f2b96 feat: add and distribute chatIdentity.FirstMessageTimestamp
`FirstMessageTimestamp` enables members of the community to determine if
there are any messages they can fetch on the community channel(chat).

`FirstMessageTimestamp` is advertised by admin for each community chat
through `CommunityDescription`. It assumes admin is online frequently
enough to capture the first channel message.

For existing communities admin determines first message timestamp by
finding oldest chat message in its local database.

task: status-im/status-desktop#6731
2022-09-09 08:59:39 +02:00
Samuel Hawksby-Robinson
26b33aa09d Added AccountType to enforce strict typing on Accounts
Also a tpyo was fixed, probably introduced by me.
2022-08-25 22:01:43 +01:00
Roman Volosovskyi
f43f43cc30
[#13672] Sync contact request decision 2022-08-24 16:08:41 +02:00
Khushboo-dev-cpp
ef21440e32
fix: Added support for intialisation of CurrentUserStatus to Automatic after profile creation (#2798) 2022-08-23 14:25:34 +02:00
Samuel Hawksby-Robinson
344272ee08 Moved protobuf marshalling closer to the structs that get marshalled 2022-08-22 13:27:59 +01:00
Samuel Hawksby-Robinson
5484b7ef9d Bug fix for IdentityImages not being empty when they are 2022-08-22 13:27:59 +01:00
Samuel Hawksby-Robinson
344458d74a Added multiaccounts.Database tests for new funcs 2022-08-22 13:27:59 +01:00
Samuel Hawksby-Robinson
83db7fc795 Added payload store functionality 2022-08-22 13:27:59 +01:00
Samuel Hawksby-Robinson
38c8e8a1fe Added payload marshal and unmarshal to/from protobuf 2022-08-22 13:27:59 +01:00
siddarthkay
924820c14a Implement wallet connect session CRUD API 2022-08-19 12:32:00 +01:00
Patryk Osmaczko
b711b61fb9 feat: add bio
closes: #2782
2022-08-16 14:29:00 +02:00
Patryk Osmaczko
4143de3816 feat: add social links
iterates: #2782
2022-08-16 14:29:00 +02:00
Pascal Precht
d0e0deac95 feat: introduce discord_message_authors persistence APIs
This introduces a new table to store discord message authors.
The main reason this table is being introduce is so that we don't have
to duplicate discord message author information in the `user_messages`
table when importing discord communities (ongoing work).

In addition to the table there are also two new APIs on the messenger
persistence layer (which are later used in the import logic):

- `HasDiscordMessageAuthor`
- `SaveDiscordMessageAuthor`

Closes #2759
2022-08-10 10:13:55 +02:00
Pascal Precht
9c568c58cf feat: introduce messenger APIs to extract discord channels
As part of the new Discord <-> Status Community Import functionality,
we're adding an API that extracts all discord categories and channels
from a previously exported discord export file.

These APIs can be used in clients to show the user what categories and
channels will be imported later on.

There are two APIs:

1. `Messenger.ExtractDiscordCategoriesAndChannels(filesToimport
   []string) (*MessengerResponse, map[string]*discord.ImportError)`

   This takes a list of exported discord export (JSON) files (typically one per
   channel), reads them, and extracts the categories and channels into
   dedicated data structures (`[]DiscordChannel` and `[]DiscordCategory`)

   It also returns the oldest message timestamp found in all extracted
   channels.

   The API is synchronous and returns the extracted data as
   a `*MessengerResponse`. This allows to make the API available
   status-go's RPC interface.

   The error case is a `map[string]*discord.ImportError` where each key
   is a file path of a JSON file that we tried to extract data from, and
   the value a `discord.ImportError` which holds an error message and an
   error code, allowing for distinguishing between "critical" errors and
   "non-critical" errors.

2. `Messenger.RequestExtractDiscordCategoriesAndChannels(filesToImport
   []string)`

   This is the asynchronous counterpart to
   `ExtractDiscordCategoriesAndChannels`. The reason this API has been
   added is because discord servers can have a lot of message and
   channel data, which causes `ExtractDiscordCategoriesAndChannels` to
   block the thread for too long, making apps potentially feel like they
   are stuck.

   This API runs inside a go routine, eventually calls
   `ExtractDiscordCategoriesAndChannels`, and then emits a newly
   introduced `DiscordCategoriesAndChannelsExtractedSignal` that clients
   can react to.

   Failure of extraction has to be determined by the
   `discord.ImportErrors` emitted by the signal.

**A note about exported discord history files**

We expect users to export their discord histories via the
[DiscordChatExporter](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#exportguild)
tool. The tool allows to export the data in different formats, such as
JSON, HTML and CSV.

We expect users to have their data exported as JSON.

Closes: https://github.com/status-im/status-desktop/issues/6690
2022-08-04 14:34:23 +02:00
530f3c7a3a
rename status-react to status-mobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-17 15:37:14 +02:00
Pascal Precht
f6c9ec7838 refactor: Require request access for all communities
This commit introduces a few changes regarding users accessing
communities:

While the APIs still exist, community invites should no longer be
used, instead communities should merely be "shared".
Sharing a community to users allows users to "join" the community,
which in reality makes them request access to that community.
This means, users have to request access to any community, even if
the community has permissions set to NO_MEMBERSHIP
Only difference between ON_REQUEST and NO_MEMBERSHIP is that
ON_REQUEST communities require manual approval of the owner/admin
to access a community. NO_MEMBERSHIP communities accept
automatically (as soon as owner/admin receives the request).
This also implies that users are no longer optimistically added to the
member list of communities, but only after they have been accepted.

This introduces a bit of a message ping-pong for users to know that
someone is now part of a community
2022-07-08 13:16:12 +02:00
Vitaliy Vlasov
3dee94e505 Wallet sync for generated accounts 2022-07-06 19:24:43 +03:00
Richard Ramos
0322ac497b
feat: contact verification request (#2586)
fix: add verification request to response

fix: code review

add missing functions and simplify timestamp usage

fix: sync verification requests

feat: add endpoint to fetch all received verification requests

feat: add signal when trusting verification request

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2022-07-05 15:49:44 -04:00
Samuel Hawksby-Robinson
dca550e1a7 Deactivating sticker pack sync 2022-06-22 14:02:18 +01:00
Vitaliy Vlasov
4f722b6fe8 Communities encryption integration 2022-06-17 21:24:39 +03:00
Pascal Precht
f3af6aa4dc feat: introduce AddBookmark and RemoveBookmark APIs to messenger
These APIs are being introduced to address #2706 and #2704, provided
that clients will move to using these APIs instead of the currently
provided equivalent APIs in the browser service.

The `bookmarks` table is being extended with a `deleted_at` field which
can later be used for garbage collection, as "removing" a bookmark is
merely soft deletion and doesn't actually remove the data from the
database.

In addition to those APIs adding and soft deleting bookmark entries,
they also automatically perform a sync operation to ensure that
bookmarks are synced in real-time (#2704).

Closes #2706, #2704
2022-06-17 12:29:03 +02:00
Pascal Precht
9d5bcc3c60 feat: sync CommunitySettings across paired devices
This commit introduces a new `clock` field in the
`communities_settings` table so that it can be leveraged for syncing
community settings across devices.

It alsoe exends existing `syncCommunity` APIs to generate
`SyncCommunitySettings` as well, avoiding sending additional sync messages
for community settings.

When editing communities however, we still sync community settings
explicitly are we aren't syncing the community itself in that case.
2022-06-16 12:45:05 +02:00
Audrius Molis
efa14805bd Enable synchronising Sticker Pack setting fields 2022-06-14 17:21:43 +03:00
Andrea Maria Piana
f9ac629b2a Enable contact request settings 2022-06-13 13:46:45 +01:00
Anthony Laibe
8c0f230644
feat: Simple transaction router (#2686) 2022-06-09 15:09:56 +02:00
Richard Ramos
c3b0582cc9
feat: fetch curated communities from smart contract on optimism (#2685) 2022-06-02 08:17:52 -04:00
Patryk Osmaczko
a471fed6a6 fix: account unmarshaling
JSON deserialization hasn't worked correctly, resulting in empty
publicKey. That led to an account created with nil color hash and
color id.
2022-05-31 15:25:13 +02:00
Andrea Maria Piana
1bfde4c4cc Initial support for mutual contact requests 2022-05-31 09:12:36 +01:00
Sale Djenic
78cba969cc notifications settings end points added and notification_settings table 2022-05-26 11:49:08 +02:00
Vitaliy Vlasov
011238b1d1 Wallet sync 2022-05-18 15:25:20 +03:00
Pascal Precht
714c03c635 feat: introduce CommunityAdminSettings in CommunityDescription
This allows to store community admin settings that are meant to be propagated
to community members (as opposed to the already existing
`CommunitySettings` which are considered local to every account).

The first setting introduced as part of this commit is one that enables
community admins to configure whether or not members of the community
are allowed to pin messages in community channels.

Prior to this commit, this was not restricted at all on the protocol
level and only enforced by clients via UI (e.g. members don't see an
option to pin messages, although they could).

This config setting now ensures that:

1. If turned off, members cannot send a pin message
2. If turned off, pin messages from members are not handled/processed

This is needed by https://github.com/status-im/status-desktop/issues/5662
2022-05-18 09:58:11 +02:00
Sale Djenic
4018e4334b Added mixed case address to the Account struct 2022-05-13 16:17:24 +02:00
Audrius Molis
a244d77657 Enable currency settings and sticker pack synchronization 2022-05-11 16:59:12 +03:00
Andrea Maria Piana
4d15ae8a85 Upgrade to go 1.18 2022-05-11 12:39:54 +01:00
Pascal Precht
43d6305157 Handle history archive magnetlink messages
This introduces the ability for status notes to handle community
history archive magnetlinks. To make this work, a few things are needed:

1. A new database table has been introduced to store message archive
   hashes. This is necessary so status nodes can determine whether or
   not they need to download a certain archive
2. The messenger's `handleRetrievedMessages()` has been exteded to take
   magnetlink messages into account
3. New APIs were added to download torrent data given a magnetlink and
   also to extract messages from downloaded archives, which are then
   later fed to `handleRetrievedMessages`

Closes #2568
2022-05-10 11:27:31 +02:00
Anthony Laibe
e199ddbe9d
feat: get wallet api (#2619) 2022-05-10 09:48:05 +02:00
Anthony Laibe
2485e84bf5
fix: default derived from for status account (#2651) 2022-05-09 10:00:48 +02:00
Pascal Precht
6ca86b6b99 Fix call to get node config 2022-04-22 12:30:46 +01:00
Vitaliy Vlasov
16197dc807 Sync profile picture 2022-04-21 19:50:31 +03:00
Khushboo-dev-cpp
b83f4a6c83
fix: Add derivation path to wallet account generation (#2618) 2022-04-13 11:15:26 +02:00
Patryk Osmaczko
5e2a33115c fix: defer functions overriding err return value 2022-04-13 11:04:26 +02:00
Andrea Maria Piana
23c9618b0e Fix deserialization multiaccounts 2022-04-12 12:53:57 -04:00
Anthony Laibe
9fef24917a
fix: generation path (#2637) 2022-04-11 12:35:18 -04:00