936 Commits

Author SHA1 Message Date
Omar Basem
2485143e20
Fix image fields (#3121)
* fix: image fields
2023-02-02 12:00:49 +04:00
Andrea Maria Piana
9e43905821 Fix broken migrations 2023-02-01 18:31:32 +00:00
yqrashawn
d4ec412df2
feat: add deleted by xxx support (#3077) 2023-02-01 08:57:35 +08:00
Andrea Maria Piana
cefa0089dc
Split clock values for contacts 2023-01-31 15:43:00 +00:00
Alexander
a3f59e223c
Fix for syncing settings (empty field is not getting added) (#3147)
* Fix for syncing settings (empty field is not getting added)

* Version bump
2023-01-31 14:37:41 +01:00
Alexander
2fba8c4591
Support providing a list of activity types when counting unread notifications (#3141)
* Support providing a list of activity types when counting unread notifications

* Minor cleanup

* Test added

* Smaller fix

* Test small fix

* uint64
2023-01-30 20:43:13 +01:00
Andrea Maria Piana
7e1a894ab8 Add compressed key to multiaccount/messages/contacts 2023-01-30 16:40:40 +00:00
Pascal Precht
f31e40264e refactor(import-tool): process import data in chunks
This commit refactors the discord import tool such that,
instead of loading all data to be imported into memory at
once, it will now perform the import on a per file basis.

This improves the memory pressure for the node performing
the import and seems to increase its performance as well.
2023-01-30 12:23:56 +01:00
Mikhail Rogachev
ee9f8edfcf
Mark as read acivated notifications with CTA (#3126)
* fix: Accepting or dismissing contact request should mark AC notification as read

* fix: Accepting or declining community request should mark AC notification as read

* fix: Read notification status fo identity verification requests

* fix: Save whole notification object while handling contact requests

* fix: Remove unused functions from activity_center_persistence

* fix: Use Accepted and Dismissed flags for AC notifications with CTA

* fix: Mark notification as unread when we handle accepted verification request

* fix: Replace Warn with Error on fail to save notification, test fixes

* fix: Fix conditions for fetching AC notifications from the db

* fix: Review fixes for err name and conditions array
2023-01-28 13:52:53 +04:00
Richard Ramos
ddfe16f56f fix: add cursors to store queries 2023-01-27 17:03:59 -04:00
Roman Volosovskyi
fc03393e1b
Fix incorrect pagination of notifications 2023-01-26 19:23:08 +01:00
Richard Ramos
3553761cb5 fix: use parent ctx (of 30s instead of 20s) and log requestID in case of failures 2023-01-26 14:13:01 -04:00
Stefan
5ff029dd57 feat: add balance_history DB table and update migration scripts
Updates status-desktop #8226
2023-01-25 22:25:50 +04:00
Richard Ramos
eb36eb3ee5 fix: cancel mailserver requests when stopping messenger 2023-01-25 11:15:12 -04:00
Roman Volosovskyi
1d9d7343c3
Fix activation of deleted chat on contact update 2023-01-25 11:12:34 +01:00
Pascal Precht
efbad4e9bc fix(DiscordImport): don't allow imports of files bigger than 50 MB
See https://github.com/status-im/status-desktop/issues/9261 for more info
2023-01-24 21:40:17 +01:00
Pascal Precht
b5964348a1 fix(communities): ensure archive import is only cancelled if not already marked as such
There were cases where this caused a crash, as handling magnetlinks would try to close
an already closed tasked channel

See https://github.com/status-im/status-desktop/issues/8996 for more information.

This commit extends the task struct such that it can be marked as cancelled and safely
read and written by multiple go routines.
2023-01-24 08:58:40 +01:00
Richard Ramos
b1960a6ca9 chore: increase mailserver timeout to 30s 2023-01-23 16:29:23 -04:00
Pascal Precht
81d4b5e0d7 fix(communities): only update last seen magnetlink when download was successful 2023-01-20 17:17:13 +01:00
Pascal Precht
eb2b4b7cdc refactor(Communities): ensure generated archives don't exceed max cap
This introduces an addition constraint to archive generation, in which the payload + signature size of all partitioned message that go into an archive should not exceed a certain
threshold.

This is to ensure that archives won't get too big when they are later read into memory.
2023-01-20 17:09:00 +01:00
Icaro Motta
e40cbfc28f
feat: Support fetching accepted Activity Center notifications by multiple types (#3088)
Summary
=======

- [x] Changes endpoint ActivityCenterNotificationsBy to support fetching
  multiple types of notification in a single query.
- [x] Adds endpoint UnreadAndAcceptedActivityCenterNotificationsCount to
  allow the mobile client to fetch the count of unread & accepted
  notifications.
- [x] Add `golangci-lint` to Nix shell. This was possible since PR
  https://github.com/status-im/status-go/pull/3087 was merged.

Notes
=====

- If you'd like to understand why these changes are needed, please see
  the mobile PR https://github.com/status-im/status-mobile/pull/14785,
  or issue https://github.com/status-im/status-mobile/issues/14712
- All changes should be completely backwards compatible, and there
  should be no impact for the desktop app.
- The mobile client has been already tested using this branch.
2023-01-20 09:45:32 -03:00
Igor Sirotin
f9faac4293
feat: ens_usernames database (#3066) 2023-01-20 13:34:30 +03:00
Pascal Precht
f85c500e9a Resume import of message history archives upon bootstrap
This adds the functionality that history archives continue to be imported
in case the import has been interrupted the last time the app/client
was running.

This typically happens when users don't wait for an ongoing import to finish,
which sometimes can take a while. Users then close the app/kill the client
which leaves the database in a state where there's downloaded archives that
haven't been fully imported.

Prior to this change, the node will have to wait until it receives a new
magnetlink that it hasn't seen before, until it processes imports again.
This can take several days.

Now, it will check on startup if there are any archives left to be imported
and resumes the import from there.
2023-01-20 07:57:24 +01:00
RichΛrd
ea46779e98 Update messenger_mailserver_cycle.go 2023-01-19 13:56:50 -04:00
Richard Ramos
f0cd807763 fix: only evaluate connected peers when active mailserver is set 2023-01-19 13:56:50 -04:00
Pascal Precht
1bab7ae056 refactor(communities): improve archive handling memory pressure
Instead of loading the entire torrent file into memory when trying
to extrract active messages, we now only read the chunks that are
necessary to decode any individual archive and then process
extracted messages in chunks.

This doesn't introduce a max cap of allowed memory yet, since the
chunk size depends entirely on the size of the archive, but this
will be done soon.
2023-01-18 15:45:13 +01:00
Richard Ramos
8fd291f27c fix: dropping peer in mailserver cycle 2023-01-18 09:28:08 -04:00
frank
4406931582
fix: should include ContactRequestState and HasAddedUs when sync contact (#3100) 2023-01-18 16:12:27 +08:00
Pascal Precht
cedc1a5fd1 fix: add discord message data to quoted messages
Because `QuotedMessage` doesn't include imported message data,
some of the author information in imported messages is lost in
frontends.

This commit adds a `discordMessage` (soon replaced by `importedMessage`)
to `Quotedmessage`, although only hydrated with a subset of data,
namely author display name and avatar URL, as those are the only ones
needed by front-end atm.
2023-01-17 12:08:42 +01:00
Andrea Maria Piana
ed9ca8392c Upgrade linter to 1.50.0 2023-01-13 17:52:03 +00:00
Andrea Maria Piana
ccbd2866fe Bump encryption too high number 2023-01-13 11:51:30 +00:00
Jonathan Rainville
cb1d80c082 feat(QuotedMessage): pass Deleted to QuotedMessage
This is to let the front end determine a new message if the quoted message is deleted instead of just unknown
2023-01-12 11:47:38 -05:00
Jonathan Rainville
7717f9519f fix(message_handler): fix error when there is no record and fix crash 2023-01-12 11:47:38 -05:00
Roman Volosovskyi
d60c1d00ed
Update chat clock on group event 2023-01-12 11:01:45 +01:00
Omar Basem
fe9996d95f
Image width height (#3061)
* feat: add image width & height
2023-01-12 13:43:14 +04:00
frank
a29511b921
update account name if necessary (#3072) 2023-01-12 11:00:24 +08:00
Jonathan Rainville
880a201037 fix(reply-test): fix reply test because msgs could come out of order
Fixes #3070
2023-01-11 16:24:42 -05:00
Patryk Osmaczko
186454528b chore: make createMessagesRequestV2 respect mailserverRequestTimeout
closes: #3053
2023-01-11 20:26:10 +01:00
Jonathan Rainville
e98e6b61af fix: use the uncompressed community pubkey as topic to receive requests 2023-01-11 13:41:29 -04:00
Jonathan Rainville
0da5e621ac test(persistence): improve reply test to test deleted reply 2023-01-10 15:34:48 -05:00
Jonathan Rainville
574bf90618 fix(message_persistence): don't return reply data of deleted messages 2023-01-10 15:34:48 -05:00
Jonathan Rainville
c4bf60b815 feat: make replies act as mentions
and add a reply test to the messenger
2023-01-10 13:39:57 -05:00
frank
ec7c0e9c7d
Sync all devices after initial pairing (#3047) 2023-01-06 20:21:14 +08:00
frank
bea710c8be
fix inconsistent contact request state (#3056) 2023-01-06 18:24:39 +08:00
Richard Ramos
ad67eb52e5 chore: log errors generated while registering filters 2023-01-05 13:30:46 -05:00
Parvesh Monu
d40290a649
Persist switcher cards (#3049) 2023-01-05 21:41:57 +05:30
frank
fe2270540e
fix TestGroupChatMembersRemoval sometimes failed (#3037) 2023-01-05 23:37:50 +08:00
cceba787fa
replace deprecated ioutil.TempDir with os.MkdirTemp
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-01-03 15:40:11 +01:00
frank
9137257638
synchronize display name (#2989) 2022-12-29 14:16:19 +08:00
Mikhail Rogachev
5005b7b3cf
feat(ActivityCenter): Add missing AC notifications for verification requests (#3029)
* feat(ActivityCenter): Add missing AC notifications for verification requests
* fix(Contacts): Fix updates for trusted and untrustworthy statuses
* feat(ActivityCenter): Add test for trusted verification request and AC notifications
* feat(Contacts): Trusted and untrustworthy statuses should be unknown for verificated side
2022-12-26 08:35:46 +04:00