762 Commits

Author SHA1 Message Date
Omar Basem
938e7987ca
feat: edit/delete/reply for emoji/sticker/audio (#2771)
* feat: edit/delete/reply for emoji/sticker/audio
2022-10-05 21:54:47 +04:00
Pascal Precht
9bb1e75939 fix: ensure discord attachment existence is checked with message ID 2022-10-05 13:17:57 +02:00
Pascal Precht
f7faebe775 chore: save discord message should use REPLACE INTO 2022-10-05 13:13:38 +02:00
Pascal Precht
ffc9aea24f fix: ensure torrent download does not finish too early 2022-10-05 13:13:16 +02:00
Michał
057c7915f4
chore: use provided pictures visibility options when creating settings db entry (#2867)
When initially creating settings, properties 'initialize profile_pictures_show_to'
and 'profile_pictures_visibility' are set according to the provided Setting object.
2022-10-05 12:53:42 +02:00
Pascal Precht
1eb8a5cc2c feat(MediaServer): add support for discord author and attachment URLs 2022-09-29 16:33:15 +02:00
Pascal Precht
b01a861e8e feat: add DiscordMessageAttachment types and APIs
This adds a new `DiscordMessageAttachment` type which is part of
`DiscordMessage`. Along with that type, there's also a new database
table for `discord_message_attachments` and corresponding persistence
APIs.

This commit also changes how chat messages are retrieved.
Here's why:

`DiscordMessage` can have multiple `DiscordMessageAttachment`.
A chat message can have a `DiscordMessage`.

Because we're `LEFT JOIN`'ing the discord message attachments into the
chat messages, there's a possibility of multiple rows per message.

Hence, this commit ensures we collect queried discord message
attachments on chat messages.
2022-09-29 11:38:29 +02:00
Pascal Precht
c01ad05525 feat(common): add ThirdPartyID to Message and protobuf.WakuMessage
Usually, message IDs are generated by their payload and signature and
in receiving nodes calculated in based on the same data as well.

There's no ID attached to messages in-flight.

This turns out to be a bit of a problem for messages that are being
imported from third party systems like discord, as the conversion
and saving of such messages and handling of their possible assets and
attachments are done in separate steps, which changes the message
payloads after their IDs have been generated.

Hence, we're introducing a `ThirdPartyID` property to `common.Message`
and `protobuf.WakuMessage` so receiving nodes of such messages (via the
archive protocol primarily) can easily detect third party/imported
messages and give them special treatment.
2022-09-29 11:15:47 +02:00
yqrashawn
f47cb8572d
feat: delete for me (#2866) 2022-09-28 19:42:17 +08:00
Pascal Precht
81e279a055 chore(community): community itself has admin rights
This might look like a weird requirement at a fist glance.
The reason this is needed, is because some message signals require
admin rights to take effect (e.g. PinMessage).

When messages are imported from third-party services,
translated to status messages, signed by the community, and eventually distributed
via the archive protocol, we need to ensure that messages signed
by the community itself are considered as admin privileges as well,
so they can be correctly replayed into the database.
2022-09-28 13:03:56 +02:00
Richard Ramos
b8fd999b54
fix: lint (#2845)
Co-authored-by: Samuel Hawksby-Robinson <samuel@samyoul.com>
2022-09-27 18:59:02 -04:00
Richard Ramos
bf9abfc350
feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
Pascal Precht
bca26fbdd9 tests(persistence): add missing test for author payload API 2022-09-27 14:45:58 +02:00
Richard Ramos
965e026cd9
fix: TestImageMessageSharing (#2874) 2022-09-21 09:48:04 -04:00
Patryk Osmaczko
e4ca8a256c fix: remove ourselves from members when leaving community
Otherwise clients see invalid members count in invitation bubbles.
2022-09-21 08:35:52 +02:00
Pascal Precht
eb4ab9316c fix(communities): ensure existing archives are seeded on startup 2022-09-19 15:34:29 +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
Andrea Maria Piana
a182f3e699 Fix bug with tracking & merge community changes 2022-09-16 22:45:29 +01:00
Roman Volosovskyi
6f93913be5
Fix activity notification delition on message delition 2022-09-16 14:10:25 +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
Andrea Maria Piana
0217b6a439 fix clock value 2022-09-16 09:52:08 +01:00
frank
325efd01d0 Implement identity ring 2022-09-16 09:52:08 +01:00
Andrea Maria Piana
f58fd4517f WIP 2022-09-16 09:52:08 +01:00
Pascal Precht
fd4488e504 feat: add signal to inform clients when all archives have been downloaded and handled
This adds a new `DownloadingHistoryArchivesFinished` signal to the
family of community archive signals. It's emitted when all to be
downloaded archives have been downloaded and handled.
2022-09-16 09:43:49 +02:00
Stefan
bcdb14bd48 fix: remove tenor.com from preview whitelist 2022-09-15 12:27:49 +02:00
Andrea Maria Piana
d689b337c9 Return ID and use chat topic when sending community message 2022-09-15 09:44:56 +01:00
Patryk Osmaczko
f915fc6df4 feat: make any member able to edit group chat properties
closes: #2824
2022-09-13 12:16:14 +02:00
Patryk Osmaczko
c01316524c feat: make any member able to add new users to group chat
closes: #2823, #2825
2022-09-13 12:16:14 +02:00
Patryk Osmaczko
eee112738b chore: move group chat logic to separate file 2022-09-13 12:16:14 +02:00
Stefan
9db69df9a0 feat: updated migrations for merging favourites with saved addresses
Required by #6546
2022-09-12 13:46:04 +02:00
Samuel Hawksby-Robinson
15f4f8956f Resolved gosec issue calling http.Get() from package default client 2022-09-09 15:07:48 +01:00
Samuel Hawksby-Robinson
505ef579eb Refactor to urls to try to remove http client use in tests
shelfing it at the moment, if it becomes a problem in the future then may be we can address it then. For the moment I've just left the refactoring I already did.
2022-09-09 15:07:48 +01:00
Samuel Hawksby-Robinson
41cb9d7bea Added httptest.NewServer to DecodeFromURL and CryptoOnRamp tests 2022-09-09 15:07:48 +01: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
Roman Volosovskyi
0ecbb5e8d7
[#13855] Fix contact request decision status on Sync All 2022-09-08 17:42:21 +02:00
Richard Ramos
37d3f9f612
chore: hardcode optimism testnet for retrieving communities portal (#2810) 2022-09-06 14:07:22 -04:00
Roman Volosovskyi
e5408fa993
[#13855] Sync last contact request decisions on Sync All 2022-09-06 18:57:23 +02:00
Samuel Hawksby-Robinson
45b287370a Implemented more comprehensive file compression to handle large files 2022-09-05 16:06:04 +01:00
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