Commit Graph

2656 Commits

Author SHA1 Message Date
Pascal Precht dd49c4c954 feat(communities): add archiveLogger for stdout logs
The default logger writes to `geth.log`, which makes debugging
the archive protocol pretty hard.

This adds an additional logger that logs to stdout, while keeping
the default logger intact for production.
2022-10-14 16:31:21 +02:00
Pascal Precht 616a58f5c9 fix(MessengerResponse): ensure `savedAddresses` response as `omitempty`
Otherwise the json response will be `null` instead of an empty array
(which broke desktop): https://github.com/status-im/status-desktop/pull/7888
2022-10-13 14:53:09 +02:00
Anthony Laibe d9b44777c9
feat: update opensea testnet to use goerli (#2894) 2022-10-12 09:59:38 +02:00
Khushboo-dev-cpp 3364c159f4
feat: Added API for getting historical data for a token (#2882) 2022-10-10 21:02:04 +02:00
Richard Ramos b14de2dd9d fix: content topic in wakuv2 2022-10-10 10:38:42 -05:00
Richard Ramos d4d35710be fix: community encryption was not being marshalled 2022-10-10 13:11:10 +02:00
Stefan b9d6e6d8c8 feat: sync saved addresses
Main changes:
- Extend saved addresses DB with sync info: sync timestamp, update timestamp
and soft removed flag
- Create custom protobuf message payload to sync saved addresses
- Cleanup saved addresses on each start of messenger, by deleting
soft removed older entries
- Sync all saved addresses on Messenger.SyncDevices calls
- Sync particular changes to saved addresses
- Add SavedAddressManager instance to messenger
  - Note, can't find a clean way to pass the SavedAddressManager to the
  messenger, so we create another one
- Add tests for sync and new DB API

Closes: #7229
2022-10-10 11:26:35 +02:00
r4bbit.eth 6c148389c1
fix(message_persistence): ensure query cursor value is supplied where (#2898)
needed

Unfortunately, this one slipped through when introducing helper
functions to retrieve messages.

Sometimes, queries need an additional empty `cursor` value.
2022-10-07 13:38:28 -04:00
Stefan daee116878 fix: compiling chat_messsage.proto due to unscoped ContentType 2022-10-07 12:49:04 +02:00
Patryk Osmaczko 73a45dd58e feat: add `SpectateCommunity` api
- added `SpectateCommunity` endpoint, it is supposed to be used in
  scenarios where we want to "Go to public Community" and see its
  content without joining
- added `spectated` field to `Community`, it means we are observing the
  community and its chats but we are not members

Use case:
https://github.com/status-im/status-desktop/issues/7072#issuecomment-1246560885
2022-10-06 21:21:37 +02:00
Richard Ramos bf04ff3502 fix: waku2 store queries 2022-10-05 18:43:10 -04:00
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
Samuel Hawksby-Robinson dde0c71cfc Added string identifier for Connection String 2022-10-05 12:58:32 +01:00
Samuel Hawksby-Robinson d7e57fbb66 VERSION bump 2022-10-05 12:20:26 +01:00
Samuel Hawksby-Robinson 61904182c5 check and make keystore if required on receiving device 2022-10-05 12:20:26 +01: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
Richard Ramos 571ab4c88d fix: use minPeers when initializing relay 2022-10-04 14:31:42 -04:00
Richard Ramos 7272bf0d91 fix: waku2 storenode cursor 2022-10-03 18:49:41 -04: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
Roman Volosovskyi 506921509e
Add effective gas price to tx view 2022-09-27 17:15:56 +02:00
Pascal Precht bca26fbdd9 tests(persistence): add missing test for author payload API 2022-09-27 14:45:58 +02:00
Sale Djenic d89c0c8d9e fix(keycard): convert to keycard action removes keystore and doesn't change the pass properly fixed 2022-09-27 12:13:50 +02:00
Andrea Maria Piana 5668bbaa8e
Bump version to 0.110.2 2022-09-22 10:11:58 +01:00
Samuel Hawksby-Robinson d82c914aa5 Fix if configJSON is empty, NOT not empty 2022-09-21 15:28:31 +01:00
Richard Ramos 965e026cd9
fix: TestImageMessageSharing (#2874) 2022-09-21 09:48:04 -04:00
Sale Djenic 698c32f3e3 chore: `UpdateKeycardUID` function exposed 2022-09-21 15:01:53 +02: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
Pascal Precht 2cac37c1fb fix(images): ensure decode from URL emits error on HTTP error code
We should emit an error when the request to an image to be fetched
returns and HTTP error code. Otherwise, we'll run into other higher
level errors down the line, which are misleading

Example: I kept seeing "image content type not supported" errors,
although the content type *is* supported. The actual problem was that
the decode function operates on non existing image bytes.
2022-09-19 12:55:17 +02:00
Andrea Maria Piana a182f3e699 Fix bug with tracking & merge community changes 2022-09-16 22:45:29 +01:00
Richard Ramos 824bb17ba9
fix: determine if a enr contains a UDP port (#2864) 2022-09-16 09:09:13 -04: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
Richard Ramos 11e432d341
feat: allow passing variables to docker-compose and fix var name (#2821) 2022-09-15 15:41:00 -04:00
Richard Ramos 208f075b72
feat: use dns discovery if a enrtree is used in the DiscV5BootstrapNodes config (#2814) 2022-09-15 10:32:54 -04:00