923 Commits

Author SHA1 Message Date
Stefan
bc00836df2 feat: add tenor domains to LinkPreviewWhitelist
Also forward the tenor URLs as previews

Updates: #6829
2022-09-05 12:32:11 +02:00
Michal Iskierko
c277e8addc fix: change migration timestamp of group chat add image feature 2022-09-01 17:55:46 +02:00
Michal Iskierko
e3f451cd79 feat: Handle image in group chat
Add image_payload column to chats table.
Add Base64Image to chat struct.
Add ImageChange event to propagate image.
Change EditChat API - use CroppedImage.
Process and crop image in EditGroupChat.
2022-09-01 12:19:01 +02:00
Roman Volosovskyi
b87ecb206e
Ignore group chat color when not specified (#2830) 2022-08-31 18:13:18 +02:00
Michał
b5cc14f302
fix(chats): mark 1-1 chat as active when contact is mutually approved (#2822) 2022-08-26 18:50:41 +02:00
Patryk Osmaczko
614f0b988c fix: prevent tests segfault 2022-08-26 11:25:33 +02:00
Patryk Osmaczko
78747889ab chore: add tests for leaving and rejoining community
covers: #2812
2022-08-26 11:25:33 +02:00
Patryk Osmaczko
7e25a6125f feat: introduce and distribute RequestToLeave community
closes: #2812
2022-08-26 11:25:33 +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
Pascal Precht
9b04633bb7 feat(communities): introduce publish flag in community manager APIs
This is so that we can control whether we want to publish the community
when it, or it's categories and channels, are created.

This is needed for the discord import so that we can create communities,
channels and categories without publishing the community and have it
show up in UIs too early.
2022-08-25 12:59:30 +02:00
Pascal Precht
16feb64671 fix(message_persistence): ensure discord message author id is stored correctly 2022-08-25 11:51:50 +02:00
Pascal Precht
3f987cc565 fix(messenger): don't remove inactive chats when syncing
This commit ensures we're relying on `chat.DeletedAtClockValue` instead
of `chat.Active` to know whether or not we need to remove the chat from
paired devices.

Because we were relying on `Active != true`, we ended up with a serious
but that would result in deactivating all chats on paired devices.

The reason the chats would disappear on paired devices is because, when
setting up a new device by importing a seedphrase, chances are this
device will receive `HandleBackUp` signals (which original from other
devices with the same account that backed up contacts etc).

When backups are handled, we create chats for every contact that's part
of the backup signal. Those chats are set to `Active = false` because
the signal handling shouldn't cause those chats to show up in the UI.

However, because those are set to `Active = false`, the next time the
user tries to sync from this devices, all those chats are considered as
"removed", hence sending "chat removed" signals when syncing (which then
causes those chats to disappear on all paired devices.

We need to rely on `DeletedAtClockValue` to know whether a chat was
indeed removed and only then emit such a signal.
2022-08-25 11:51:01 +02:00
Samuel Hawksby-Robinson
a6757762af fix weird import quirirk 🤔 2022-08-24 23:30:09 +01:00
Roman Volosovskyi
f43f43cc30
[#13672] Sync contact request decision 2022-08-24 16:08:41 +02:00
Ibrahem Khalil
5949ed2a44
Issue 13813 -- Use messenger ns for browser CRUD (#2801)
* Move browser CRUD to messenger ns

* Remove tests

* Create new endpoints for browsers CRUD

* Move tests to correct ns

* Lintil soup

* Fix tests

* Lint

* Bump status-go

Co-authored-by: Ibrahem Khalil <33176106+vampirekiddo@users.noreply.github.com>
2022-08-24 16:05:35 +02:00
Richard Ramos
1f64bf1cfe
feat: log raw messages to csv for debugging (only if explicitly enabled) (#2737) 2022-08-24 08:06:48 -04:00
Samuel Hawksby-Robinson
5eb8e5a34f Added payload reset on PayloadManager level 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
38c8e8a1fe Added payload marshal and unmarshal to/from protobuf 2022-08-22 13:27:59 +01:00
Michal Iskierko
e6a3f63ec7 feat: Add DeclinedRequestsToJoinForCommunity to API
Issue #6279
2022-08-22 13:43:26 +02:00
siddarthkay
924820c14a Implement wallet connect session CRUD API 2022-08-19 12:32:00 +01:00
Patryk Osmaczko
9cf61d205f chore: remove name redundancy TransformToProtobuf -> ToProtobuf 2022-08-16 14:29:00 +02:00
Patryk Osmaczko
78d4d86f68 chore: add bio and social links validation 2022-08-16 14:29:00 +02: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
081974da1e feat: add discord_messages table and persistence APIs
This adds a new `discord_messages` table and extends the persistence
APIs such that `MessagesByID` and `MessageByID` will return user
messages that include their discord message payload.

It also adds APIs to save individual discord messages.
2022-08-11 10:49:23 +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
eda6d10ce5 fix: adjust error codes for discord import
There are two types of errors "non-critical" (or "warning") and "critical".
These map to error codes `1` and `2` respectively.

The current error codes are a left-over of initial experimenting.
2022-08-08 19:37:19 +02:00
Mikhail Rogachev
cd91b19737
feat: add optional inviteMessage to share-community request (#2776) 2022-08-08 13:49:39 +03:00
Michal Iskierko
31671ea040 feat: distribute color info when creating group chat or changing chat color
Regenerating protocol protobuf files - membership_update_message.proto change.

Issue #5982
2022-08-08 10:33:38 +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
Roman Volosovskyi
0135cc155b
[#13647] Avoid rewriting of response.Settings on new acc sync 2022-08-03 12:12:53 +02:00
Parvesh Monu
60a49fc7d9
Timeout automatic status updates (#2757) 2022-08-03 04:38:01 +05:30
Pascal Precht
1ac88975b0 feat(messenger): add createDefaultChannel flag to CreateCommunity API
This introduces a flag to configure whether `Messenger.CreateCommunity`
should create a default channel.

As discussed in https://github.com/status-im/status-go/issues/2758, this
is needed for the upcoming functionality to import discord communities.

Closes #2758
2022-07-26 10:23:49 +02:00
audriu
4aa341395c
Fix sync of blocked contacts (#2764) 2022-07-22 14:59:32 +03:00
Patryk Osmaczko
e5e07408e2 feat: share image/username on separate topic on a community
closes: #2707
2022-07-20 10:35:19 +02:00
Vitaliy Vlasov
28b76ce4ca Fix DeleteAccount 2022-07-19 21:29:12 +03:00
Andrea Maria Piana
897bd0f58f Dont send notification to our own devices 2022-07-18 17:17:20 +01: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
Michal Iskierko
a8c8604745 fix: DismissLatestContactRequestForContact - set default request id
Issue #6395
2022-07-15 15:08:53 +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
Andrea Maria Piana
0078e39e3d Reduce max keep in tests 2022-07-07 13:35:12 +01:00
Audrius Molis
d17b076bc2
Remove remote contact when removing localy (#2735) 2022-07-07 11:49:52 +03:00
Vitaliy Vlasov
3dee94e505 Wallet sync for generated accounts 2022-07-06 19:24:43 +03:00
Boris Melnik
3e65e36fa6
feat: Add mute category methods (#2736) 2022-07-06 19:16:19 +03:00
frank
76e2d843a6 Cache community link previews 2022-07-06 11:44:14 +01: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
Mikhail Rogachev
7ad0057003
feat(@communities): Add saving tags on community edit (#2739) 2022-07-04 16:56:00 +03:00
Michal Iskierko
72d2a97449 feat: unban user in community
Issue #2724
2022-07-04 09:02:33 +02:00
Andrea Maria Piana
54b9b0e8af Handle default contact request in accept-latest 2022-06-27 09:38:06 +01:00