Commit Graph

289 Commits

Author SHA1 Message Date
Roman Volosovskyi c0c90947ab
[#12783] Improve order of mailserver requests 2022-02-02 09:38:30 +02:00
Andrea Maria Piana f5b8774f51 Mark messages as processed 2022-01-14 09:34:44 +00:00
Richard Ramos 98784b752a
feat: desktop mailserver cycle (#2481) 2022-01-12 12:02:01 -04:00
Michele Balistreri 9feea4fe25
dont sync chats with pending notifications (#2458)
* dont sync chats with pending notifications
* set accepted/dismissed notifications as read
* activate chat if message is sent from us
2021-12-07 17:34:43 +03:00
Roman Volosovskyi 3564630c33
Allow sending messages offline (non-datasync messages) 2021-12-07 12:12:49 +02:00
Michele Balistreri 0867458f16
Sync activity center (#2443)
sync activity center
2021-12-02 17:23:02 +03:00
Andrea Maria Piana f60cf5cd47 Wait for p2p messages to be processed 2021-12-01 12:58:46 +00:00
Anthony Laibe 73c7ea57d1
feat: auto message (#2441)
Send message every 2 minutes to status-bot chat id
2021-11-29 14:11:55 +01:00
Parvesh Monu a65c873b8f
Decline pending group invitations from user, when user is banned (#2437) 2021-11-25 20:51:42 +05:30
Andrea Maria Piana 6724cf4c75 Block contact endpoint 2021-11-15 18:53:35 +00:00
Andrea Maria Piana ca6246d5f2 Set last backup 2021-11-15 18:53:35 +00:00
Andrea Maria Piana a7b0c6c933 Backup removed & added by them contacts 2021-11-15 18:53:35 +00:00
Andrea Maria Piana 301325a22e Add backing up of contacts
We periodically check whether we should backup contacts through waku.

Currently it's not tied to any event, it will only schedule a backup on
a tick, or through the provided API endpoint.
2021-11-15 18:53:35 +00:00
Anthony Laibe c95c29bba5 feat: Push messages to telemetry server when receiving messages 2021-11-10 09:34:14 +01:00
saledjenic dbac362bc7
Added api points for fetching message details and message reactions (#2423)
by message id
2021-11-05 09:48:20 -04:00
Roman Volosovskyi 4a0ad1cf69
[pairing] Sync read messages 2021-11-02 10:02:27 +02:00
Andrea Maria Piana 2d13fa1e25 Add logging of message-id 2021-11-01 11:53:08 +00:00
Parvesh Monu c20e8ebdef
Store Highlight field for identify new chats (#2384) 2021-10-21 22:34:56 +05:30
Andrea Maria Piana 48b466674b Replay skipped migration 2021-10-20 18:41:00 +01:00
Andrea Maria Piana c9b66d18da Send picture in private chats 2021-10-20 18:41:00 +01:00
Andrea Maria Piana 75aebd94ab Republish image on change of visibility settings 2021-10-08 14:36:30 +01:00
Brian Sztamfater 4d3c04e41c
Modify CanonicalImage function to return large or thumb image if available (#2300) 2021-10-07 01:42:27 -03:00
Roman Volosovskyi 4de912baba [pairing] Sync chat removing 2021-10-06 12:38:57 +01:00
Andrea Maria Piana 5e83d8e95e Add HasAddedUs field 2021-10-04 12:19:15 +02:00
Andrea Maria Piana 438c2e8883 contacts performance 2021-10-04 12:19:15 +02:00
Samuel Hawksby-Robinson d9ea6a910e Tests and linting 2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson 0ff7a864ec Attempting to resolved 'no such column: profile_pictures_show_to'
Have resolved the settings table not found but now the column is not migrating for some reason
2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson 3a1349141a Refactor so both Messenger and MessageHandler could use code from a shsared source 2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson 97754cb907 Added new Settings field ProfilePicturesShowTo 2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson b009bac5fb Switched encryption of payload and keys to AES
Added Encrypted field to the protobuf
2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson 0080de754e Added encryption element to 2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson de14ec9628 Added getSettings helper and moved IdentityImage attachment to dedicated function 2021-09-30 13:02:41 +01:00
Richard Ramos 0575030825 feat: adding peers, fix peer count and fix format of peer stats signal 2021-09-27 09:04:28 -04:00
Roman Volosovskyi 5793470fad
[pairing] Fetch history on receiving pubchat installation. 2021-09-27 11:56:29 +03:00
Roman Volosovskyi 839d6b3194
[status-im/status-react#12517] Ensure that all necessary contact fields are synced 2021-09-23 12:22:49 +03:00
andrey 59eeed9436 chats list performance 2021-09-20 10:51:18 +02:00
Michele Balistreri fb218761d9
add MarkAllReadInCommunity (#2364)
add MarkAllReadInCommunity
2021-09-20 09:33:36 +03:00
Samuel Hawksby-Robinson 07e46714f0
Anon Metrics Broadcast (#2198)
* Protobufs and adapters

* Added basic anon metric service and config init

* Added fibonacci interval incrementer

* Added basic Client.Start func and integrated interval incrementer

* Added new processed field to app metrics table

* Added id column to app metrics table

* Added migration clean up

* Added appmetrics GetUnprocessed and SetToProcessedByIDs and tests

There was a wierd bug where metrics in the db that did not explicitly insert a  value would be NULL, so could not be found by . In addition I've added a new primary id field to the app_metrics table so that updates could be done against very specific metric rows.

* Updated adaptors and db to handle proto_id

I need a way to distinguish individual metric items from each other so that I can ignore the ones that have been seen before.

* Moved incrementer into dedicated file

* Resolve incrementer test fail

* Finalised the main loop functionality

* Implemented delete loop framework

* Updated adaptors file name

* Added delete loop delay and quit, and tweak on RawMessage gen

* Completed delete loop logic

* Added DBLock to prevent deletion during mainLoop

* Added postgres DB connection, integrated into anonmetrics.Server

* Removed proto_id from SQL migration and model

* Integrated postgres with Server and updated adaptors

* Function name update

* Added sample config files for client and server

* Fixes and testing for low level e2e

* make generate

* Fix lint

* Fix for receiving an anonMetricBatch not in server mode

* Postgres test fixes

* Tidy up, make vendor and make generate

* delinting

* Fixing database tests

* Attempted fix of does:  cannot open `does' (No such file or directory)
not:   cannot open `not' (No such file or directory)
exist: cannot open `exist' (No such file or directory) error on sql resource loas

* Moved all anon metric postgres migration logic and sources into a the protocol/anonmetrics package or sub packages. I don't know if this will fix the does:  cannot open `does' (No such file or directory)
not:   cannot open `not' (No such file or directory)
exist: cannot open `exist' (No such file or directory) error that happens in Jenkins but this could work

* Lint for the lint god

* Why doesn't the linter list all its problems at once?

* test tweaks

* Fix for wakuV2 change

* DB reset change

* Fix for postgres db migrations fails

* More robust implementation of postgres test setup and teardown

* Added block for anon metrics functionality

* Version Bump to 0.84.0

* Added test to check anon metrics broadcast is deactivated

* Protobufs and adapters

* Added basic anon metric service and config init

* Added new processed field to app metrics table

* Added id column to app metrics table

* Added migration clean up

* Added appmetrics GetUnprocessed and SetToProcessedByIDs and tests

There was a wierd bug where metrics in the db that did not explicitly insert a  value would be NULL, so could not be found by . In addition I've added a new primary id field to the app_metrics table so that updates could be done against very specific metric rows.

* Updated adaptors and db to handle proto_id

I need a way to distinguish individual metric items from each other so that I can ignore the ones that have been seen before.

* Added postgres DB connection, integrated into anonmetrics.Server

* Removed proto_id from SQL migration and model

* Integrated postgres with Server and updated adaptors

* Added sample config files for client and server

* Fix lint

* Fix for receiving an anonMetricBatch not in server mode

* Postgres test fixes

* Tidy up, make vendor and make generate

* Moved all anon metric postgres migration logic and sources into a the protocol/anonmetrics package or sub packages. I don't know if this will fix the does:  cannot open `does' (No such file or directory)
not:   cannot open `not' (No such file or directory)
exist: cannot open `exist' (No such file or directory) error that happens in Jenkins but this could work
2021-09-01 13:02:18 +01:00
Roman Volosovskyi 8d7f26eb60
Register public and community chats for push notifications after creation 2021-09-01 12:30:42 +03:00
Roman Volosovskyi 0c0e02e93a
Return counter for messages with mention which are marked as seen 2021-08-31 11:49:40 +03:00
RichΛrd 842ba229df
feat: add function to obtain bloomfilter (#2334) 2021-08-26 16:25:43 -04:00
andrey 20363e32ef fix activechats ordering 2021-08-25 15:10:26 +02:00
Roman Volosovskyi 45212b0823
[status-im/status-react#12450] Add push notification for deleted message 2021-08-20 11:26:46 +03:00
saledjenic b8959e3f66
feature(@status-go/chat): implement search results for communities, channels (#2303)
AllMessagesFromChatsAndCommunitiesWhichMatchTerm method added which returns all messages which
match the search term, if they belong to either any chat from the chatIds array or any channel of
any community from communityIds array.

This api point is necessary for desktop issue 2934.

Fixes: #2934
2021-08-19 15:47:03 -04:00
Samuel Hawksby-Robinson 89251e8416
Sync Communities (#2253)
* Added community sync protobuf

* Updated community sync send logic

* Integrated syncCommunity handling

* Added synced_at field and tidied up some other logic

* persistence testing

* Added testing and join functionality

* Fixed issue with empty scan params

* Finshed persistence tests for new db funcs

* Midway debug of description not persisting after sync

* Resolved final issues and tidied up

* Polish

* delint

* Fix error not handled on SetPrivateKey

* fix infinite loop, again

* Added muted option and test fix

* Added Muted to syncing functions, not just in persistence

* Fix bug introduced with Muted property

* Added a couple of notes for future devs

* Added most of the sync RequestToJoin functionality

Tests need to be completed and tests are giving some errors

* Finished tests for getJoinedAndPending

* Added note

* Resolving lint

* Fix of protobuf gen bug

* Fixes to community sync tests

* Fixes to test

* Continued fix of e2e

* Final fix to e2e testing

* Updated migration position

* resolve missing import

* Apparently the linter spellchecks

* Fix bug from  #2276 merge

* Bug fix for leaving quirkiness

* Addressed superfluous MessengerResponse field

* Addressed feedback

* VERSION bump
2021-08-06 16:40:23 +01:00
saledjenic c4a71f813a
feature(@status-go/chat): implement search on sqlcipher (status-go side) (#2282)
* feature(@status-go/chat): implement search on sqlcipher (status-go side)

Searching messages by some term for a specific channel is added on the side of status-go.

Fixes: #2912

* Linting

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2021-08-04 15:31:44 -04:00
RichΛrd facad9f07e
feat: upload/download rate for waku v1 messages (#2286)
* feat: upload/download rate for waku v1 messages

* reorganize code

* fix failing test
2021-08-03 15:27:15 -04:00
Jonathan Rainville cdc7c55030
Delete messages (#2279)
* feat: add api and handling to delete messages

* fix(delete): add whitelist to message types that can be deleted
2021-07-26 17:06:32 -04:00
RichΛrd 026fcb09a4
feat: user status (#2276)
* feat: user status

* fix: sql filename and null pointer exceptions

* fix: lint

* refactor: remove StatusUpdate from database.go

* fix: adding missing status updates persistence methods

* fix: code review

* Update version and bindata, and lint

* fix: failing test

* fix: code review

* fix update statement
2021-07-22 13:41:49 -04:00
RichΛrd bfdc000bbc
go-waku: RequestAllHistoricMessages (#2258)
* feat: update wakuv2 store

* check online using waku version for now

* fix peerId and from/to multiplier

* fix: lint

* fix: handle waku2 cursors

* fix: code review

* fix: code review 2

* update go-waku version

* update vendor folder
2021-07-21 15:02:50 -04:00
Andrea Maria Piana 1e8688ac56 Upgrade to london signer and cleanup 2021-07-20 10:57:38 +02:00
Andrea Maria Piana 4b0daeb47b Move services to status-node
Move all the services to status-node, as some of them were there, some
of them were in the geth backend and scattered around.
2021-07-20 10:57:38 +02:00
Brian Sztamfater 92404a5ab7
Add reply message to activity center notification of type reply (#2272) 2021-07-15 17:21:44 -03:00
Bitgamma 58e39adf03
add ChatID to transaction commands (#2274) 2021-07-07 14:18:18 +03:00
Andrea Maria Piana 29deacc2df address feedback 2021-06-29 13:15:15 +02:00
Andrea Maria Piana 075ee9c29f Merge message handler with messenger 2021-06-29 13:15:15 +02:00
Andrea Maria Piana 58a8872c57 Handle out of order edits 2021-06-29 13:15:15 +02:00
Andrea Maria Piana 7bac25c8e0 Separate edit message protocol message 2021-06-29 13:15:15 +02:00
Andrea Maria Piana 5d856adc0c Change to map in messenger response 2021-06-29 13:15:15 +02:00
Richard Ramos 217bace570 feat: edit messages 2021-06-29 13:15:15 +02:00
Volodymyr Kozieiev 0e538c0a95
Rename MessageProcessor to MessageSender (#2264) 2021-06-23 17:13:48 +03:00
Jonathan Rainville 14cfcebb5a
feat: add author to notification in activity center (#2259) 2021-06-17 11:08:28 -04:00
RichΛrd 40359f9c1b
go-waku integration (#2247)
* Adding wakunode module
* Adding wakuv2 fleet files
* Add waku fleets to update-fleet-config script
* Adding config items for waku v2
* Conditionally start waku v2 node depending on config
* Adapting common code to use go-waku
* Setting log level to info
* update dependencies
* update fleet config to use WakuNodes instead of BootNodes
* send and receive messages
* use hash returned when publishing a message
* add waku store protocol
* trigger signal after receiving store messages
* exclude linting rule SA1019 to check deprecated packages
2021-06-16 16:19:45 -04:00
Jonathan Rainville 43fa2edc1e
feat: add replies to activity center (#2257) 2021-06-11 16:14:05 -04:00
Andrea Maria Piana b395144704 Upsert one to one chat on mute
Before, status-react would make sure a chat existed before muting, now
the logic is all in the endpoint.
2021-06-07 07:21:06 +02:00
Andrea Maria Piana 60de443e89 address feedback 2021-06-01 12:59:52 +02:00
Brian Sztamfater a72c32009a
Add mention notification to activity center (#2239)
Signed-off-by: Brian Sztamfater <brian@status.im>
2021-05-29 14:05:25 -03:00
Andrea Maria Piana 11de62749d Add unviewed mentions count
This commit add a field to count the unviewed mentions in a given chat.
The usage pattern is identical to `UnviewedMessagesCount`
2021-05-28 13:05:23 +02:00
Andrea Maria Piana dfd4668087 Add mentioned field
This commit adds a Mentioned field to Message, which indicates whether
the receiving user is mentioned in the message.
2021-05-26 08:33:38 +02:00
Andrea Maria Piana 71f66f6806 Set timestamp on group chat invitation 2021-05-24 13:45:15 +02:00
Andrea Maria Piana d50fee6bb2 Handle connection state 2021-05-21 07:22:58 +02:00
Andrea Maria Piana cf6ef3171a Add mailserver logic 2021-05-21 07:22:58 +02:00
Andrea Franz e9a42bfa2b
add PinMessage and PinnedMessage (#2180)
* add PinMessage and PinnedMessage

* fix gruop pin messages

* add SkipGroupMessageWrap to pin messages

* update pinMessage ID generation to be symmetric
2021-05-14 23:22:50 +02:00
Volodymyr Kozieiev 9241903edb
Refactorings: whisper transport removed (#2200) 2021-04-22 16:36:18 +03:00
Volodymyr Kozieiev 8a370c1c41
Request info about community from mailserver (#2177) 2021-04-19 15:09:46 +03:00
Andrea Maria Piana c739f73f49 Add activity center & messages from contacts only 2021-04-16 20:42:40 +02:00
Samuel Hawksby-Robinson 759f7bbeb3 Added granual locking on Messenger 2021-04-16 20:42:40 +02:00
Andrea Maria Piana c55659b4f6
Add community notifications (#2160)
This commit introduces the following changes:

- `local-notifications` require as body an interface complying with
`json.Marshaler`
- removed unmarshaling of `Notifications` as not used (we only Marshal
notifications)
- `protocol/messenger.go` creates directly a `Notification` instead of
having an intermediate format
- add community notifications on request to join
- move parsing of text in status-go for notifications
2021-03-31 18:23:45 +02:00
Andrea Maria Piana f75f7bb738 Expand confirmations to private group chat messages
This commit expands the confirmation mechanism to allow private group
chat messages to be confirmed:

Changes:

- Added a separate table for message confirmations as group chat
messages have same messageID but multiple datasyncID
- Removed DataSyncID from raw message (I haven't removed the column name
as it can't be done in sqlite without copying over the table)
2021-03-16 13:41:14 +01:00
Andrea Maria Piana 290f21d9ba Fix missing chat from notifications 2021-03-05 16:05:56 +01:00
andrey 66c78c6a7f don't sync profile and timeline chats 2021-03-05 16:05:56 +01:00
Andrea Maria Piana 0a686bba4c Fix syncing of public chats
Timeline chats are created as public chats, in any place where we sync
them we need to check that they are excluded.
2021-03-03 08:57:48 +01:00
Andrea Maria Piana f115b8d289 Request/Decline access to communities 2021-02-26 15:35:43 +01:00
Roman Volosovskyi 99a304686f
Filter message PNs on status go side 2021-02-25 10:19:10 +02:00
Frank Tang 42ab47a9ee fix "Pending" status for messages in private group chat 2021-02-24 08:17:24 +01:00
Volodymyr Kozieiev c38439e664
Listen for delivered messages (#2150) 2021-02-23 17:47:45 +02:00
Samuel Hawksby-Robinson 730f540a0b
Adding Transactions messages to the localnotifications (#2142)
* Revert "Revert "Expand Local Notifications to support multiple Notification types (#2100)""

This reverts commit 5887337b88.

* Revert "Revert "fix protocol.MessageNotificationBody marshalling""

This reverts commit cf0a16dff1.

* Bump version to 0.70.0

* Added localnotifications for Transaction messages

* Fixed bug where Message.SigPubKey was presumed to be set

* Added lookup for contact existing in Messenger.allContacts

Additionally added functionality to add a contact to the messenger store if it isn't present

* Get chat directly from Messenger.allChats store

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2021-02-23 07:37:08 +00:00
Andrea Maria Piana ee8f333dbf Avoid concurrent access to contacts
We were not locking before accessing the contacts map and it would panic
in some cases.

I have changed the code to pull contacts from db so we move away from
having locks.
2021-01-27 10:54:52 +01:00
Andrea Maria Piana f73fb9c3f6
Merge branch 'bug/saved-mailserver-topics' into develop 2021-01-26 12:42:14 +01:00
Andrea Maria Piana a1b3e3a772
Clean topics that we don't listen to
There was a bug on status-react where it would save filters that were
not listened to.
This commit adds a task to clean up those filters as they might result
in long syncing times.

This commit also returns topics/ranges/mailserves from messenger in
order to make the initialization of the app simpler and start moving
logic to status-go.

It also removes whisper from vendor.
2021-01-26 09:39:57 +01:00
Andrea Maria Piana 9d2117e227
Send abridged version of history with messages in group chats
When sending a message in a private group chat we send the whole history
for redundancy and allow out-of-order processing.
This can be very expensive in some chats, resulting in long delay when
sending a message and calculating the POW.
This commit improves the performance  by only forwarding the events
necessary for the user to be able to construct a group chat and process
correctly the message.
2021-01-26 09:39:52 +01:00
Andrea Maria Piana d7772d3fc6
Skip wrapping emojis in private group chats
This commit fixes a couple of issues:
1) Emojis were sent to any member of the group chat, regardless of
whether they joined
2) We don't want to wrap emojis, as there's no need to do so, only
messages are to be wrapped
2021-01-26 09:39:47 +01:00
Volodymyr Kozieiev 31f2196cb2 Fix segmentation failure on mailserver 2021-01-26 08:28:24 +01:00
Andrea Maria Piana e3969a7752 Cache waku messages
This commit re-introduces a feature that we lost during the migration to
status-go.
Messages are cached for a couple of days if processed correctly by
status-go, to avoid performance issues.
2021-01-18 09:38:27 +01:00
Andrea Maria Piana b331b61807 Add ClearHistory & DeactivateChat methods 2021-01-11 13:36:05 +01:00
Andrea Maria Piana 4084c9d82c Don't resend automatically group chat messages
Since we fixed re-sending of messages, it has been noticed a performance
degradation in private group chats.
This is due to too aggressive re-sending of messages.
This commit disables resending of private group chat messages for now
(same as 1.9, so no changes), but keeps it enabled for 1-to-1s.
2021-01-11 09:01:26 +01:00
Andrea Maria Piana f5482ec187 Remove filters 2020-12-23 17:20:55 +01:00
Andrea Maria Piana 06dcf0cea9 Allow emoji reactions 2020-12-23 17:20:55 +01:00
Andrea Maria Piana 3be6d86326 Remove user from community 2020-12-23 17:20:55 +01:00
Andrea Maria Piana 5d929c3584 Handle organisation membership requests 2020-12-23 17:20:55 +01:00