Commit Graph

574 Commits

Author SHA1 Message Date
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
Andrea Maria Piana 51493d61bd Resend on new contact 2021-09-30 13:02:41 +01: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 a50048e290 Updated tests to match refactor 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 33487d64de Updated tests to include tests on IdentityImage.Encrypted state 2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson 1534fc15c9 Updated contact key gen in test so index call wouldn't be ambiguous 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
Samuel Hawksby-Robinson aaf9aeca8a Added encryption keys to the IdentityImage protobuf 2021-09-30 13:02:41 +01:00
Richard Ramos 3b05d379bd
feat: add signals that are emitted before/after history messages are requested (#2378)
* fix: sqlite variable limit

* feat: add signal for history messages
2021-09-28 14:41:35 -04:00
Andrea Maria Piana 5c55ab5264 Make sure request is originating from us before marking it as processed
This commit fixes one source of flakyness in the tests, which was an
actual bug.

If 1 device is registering with a push notification server, if there's
another device with the same public key, both would mark themselves as
registered, while maybe only one has been actually registered.

To fix this, we keep track of the request ids we send (in memory for
now), and only mark it as registered if the request was originating on
this device.
2021-09-28 12:31:26 +01:00
Brian Sztamfater d65494d1f8
Send notification when your contact invites you to group chat (#2361) 2021-09-27 11:02:25 -03:00
RichΛrd 7d148272e1 feat: functions to add peers and dial (#2345) 2021-09-27 09:04:28 -04: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 181c06722f
Mark own messages as seen 2021-09-27 12:42:07 +03:00
Roman Volosovskyi 5793470fad
[pairing] Fetch history on receiving pubchat installation. 2021-09-27 11:56:29 +03:00
Roman Volosovskyi cef8ec2508
Allow to retreive profile updates after removing contact 2021-09-24 12:16:15 +03:00
Andrea Maria Piana 3daba8c247 Shorten loop on waiting for community 2021-09-24 10:12:42 +01:00
Andrea Maria Piana bd314b8adc Fix timeline/profile updates messages 2021-09-24 10:01:40 +01: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
Richard Ramos a8a5acabb2 fix: sqlite variable limit 2021-09-22 08:04:28 -04: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
Andrea Maria Piana bd1e6b0033 Fix handling on public chat messages 2021-09-15 09:28:51 +01:00
Andrea Maria Piana b48522c59b Fix removing message from map 2021-09-15 09:28:51 +01:00
Roman Volosovskyi d8d5d797da
Reregister for push notification on joining community 2021-09-02 10:30:03 +03:00
Andrea Maria Piana e63f6461ed Status public API 2021-09-01 15:52:09 +02: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
RichΛrd fe086b2fdd
fix: allow empty category id when sorting chats and fix error messages (#2301)
* fix: allow empty category id when sorting chats and fix error messages
* fix: unordered maps
2021-08-25 12:52:28 -04:00
andrey 20363e32ef fix activechats ordering 2021-08-25 15:10:26 +02:00
Andrea Maria Piana 83394e0ed1
Add chatID to removed messages 2021-08-25 12:21:40 +03:00
Brian Sztamfater 0e54d04e67
Delete activity center notifications for deleted messages (#2319) 2021-08-23 11:23:55 -03:00
Anthony Laibe dbd34ae7eb
feat: Re-enable unfurling for tenor (#2302) 2021-08-20 15:13:10 -04:00
andrey ab08042f21 preload chats 2021-08-20 15:29:09 +02:00
Roman Volosovskyi 45212b0823
[status-im/status-react#12450] Add push notification for deleted message 2021-08-20 11:26:46 +03:00
Andrea Maria Piana 482518d179 Fix last message deletion 2021-08-20 10:07:14 +02: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
Jakub Sokołowski b22a261bc2 using zap.NewNop() ignores configured log level
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-19 11:35:40 +02:00
Ismael 1efe023dd7 Add unfurling for Twitter links
Fix lint issues

Wrap json.Unmarshall() errors in urls.go

Bump version 0.83.9 -> 0.83.10
2021-08-16 20:03:10 +02:00
RichΛrd dae447466f
fix: delete messages when the signal arrives before the OG msg (#2310)
* fix: delete messages when the signal arrives before the OG msg
* fix: code review
2021-08-13 13:10:32 -04:00
RichΛrd 8a7fd22ceb
add index on user_messages to speed-up marking all messages as read (#2304) 2021-08-11 08:26:15 -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
Andrea Maria Piana c35ceff06e Set timeout on mailserver requests 2021-08-03 11:16:37 +02:00
Jonathan Rainville 151edb3607
feat: add api to delete a community channel (#2266) 2021-07-30 13:05:44 -04:00
Michele Balistreri e4038df1ed
make group chat active and join if we requested invitation (#2285) 2021-07-27 15:43:46 +03: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 f31dc5df92 Use marshal binary 2021-07-20 10:57:38 +02:00
Andrea Maria Piana d84da4f515 Fix some tests and restore private/public RPC client 2021-07-20 10:57:38 +02: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
Andrea Maria Piana 799bd93451 Memove mailserver registry and update ierc20 contract bindings
This commit removes the mailserver contract registry, as not used
anymore, and upgrade the ERC20 contract bindings.
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
Jonathan Rainville 491e2a84c4
fix: fix unread notification count to exclude dismissed and accepted (#2261) 2021-07-06 12:07:41 -04:00
RichΛrd 44fe606155
fix: make the community id prefix optional in chat ids (#2273) 2021-07-02 14:07:49 -04:00
frank c799e5eb6b Drop audio messages in public chats 2021-07-02 13:09:30 +02:00
Jonathan Rainville 11c46edd8b
feat(community): add muted to community and function to set it (#2271) 2021-06-30 09:29:43 -04:00
Eric Mastro 7c1765786a
fix: update community invite push notification text (#2263)
Changes the community invitation text notifications from

“Upgrade to see a community invitation”

to

**InviteUsersToCommunity**
```golang
fmt.Sprintf("You have been invited to the community %s", community.Name())
```

**ShareCommunity**
```golang
fmt.Sprintf("Community %s has been shared with you", community.Name())
```
2021-06-29 09:56:06 -04:00
Andrea Maria Piana 45a8de8e2b Fix notifications in activity center when chat is inactive 2021-06-29 13:15:15 +02:00
Andrea Maria Piana f1066857f4 Handle group chat message edits 2021-06-29 13:15:15 +02:00
Andrea Maria Piana c18d827d54 Validate edit 2021-06-29 13:15:15 +02:00
Andrea Maria Piana e68fad2788 validate text 2021-06-29 13:15:15 +02:00
Andrea Maria Piana 29deacc2df address feedback 2021-06-29 13:15:15 +02:00
Andrea Maria Piana 9807c285e5 add last message 2021-06-29 13:15:15 +02:00
Andrea Maria Piana ee06809ff8 Handle edit first & then message 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 dbdf2565ae WIP 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 2c0902837a
fix: fix bad copy paste for the notification author (#2260) 2021-06-21 11:39:00 -04: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
Jonathan Rainville f2678ea950
Make it possible to mark individual notifications as read (#2256)
* feat: make it possible to mark individual notifications as read

* fix mark one notif test
2021-06-11 12:47:53 -04:00
Andrea Franz f80b5e66a2
add PinnedBy to PinnedMessage (#2250)
* add PinnedBy to PinnedMessage

* change PinMessage to have named embedded struct for Message

* update pinned messages API response
2021-06-08 17:23:32 +02: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 cc0bb8540e Validate no duplicated community chat names 2021-06-03 13:27:49 +02:00
Volodymyr Kozieiev 22204c3757
Fix handling community description (#2254) 2021-06-03 13:49:04 +03:00
Andrea Maria Piana 10becb4902 Fix order of migration
The previous migration was added but not as the last one, resulting in
being skipped on client who had already migrated
2021-06-02 14:16:29 +02:00
Eric Mastro a62e76d3ed
Change community channel description (#2236)
Co-authored-by: Volodymyr Kozieiev <vkjr.sp@gmail.com>
2021-06-01 15:13:17 +03:00
Andrea Maria Piana 60de443e89 address feedback 2021-06-01 12:59:52 +02:00
Andrea Maria Piana af1e47c258 Fix group chat filters 2021-06-01 12:59:52 +02:00
Andrea Maria Piana 319461e9b7 Set synced_to/from to 24 hours ago 2021-06-01 12:59:52 +02:00
Andrea Maria Piana 3a61c3bae9 Allow setting mailserver sync value
This commit adds a setting for mailserver, that allows the client to
specify the syncing period.
Also fixes a minor issue with deletion of public chats.
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
Roman Volosovskyi d1dc5f1e27
[wallet] Add wallet_getChachedBalances method 2021-05-25 10:03:05 +03:00
Andrea Maria Piana 71f66f6806 Set timestamp on group chat invitation 2021-05-24 13:45:15 +02:00
RichΛrd 92032c7158
Community categories (#2228)
* create and edit community categories
* edit categories order
* adding category to chat
* Adding categories to json
2021-05-23 09:34:17 -04:00
Andrea Maria Piana d50fee6bb2 Handle connection state 2021-05-21 07:22:58 +02:00
Andrea Maria Piana be01875d1d remove mailserver logic 2021-05-21 07:22:58 +02:00
Andrea Maria Piana cf6ef3171a Add mailserver logic 2021-05-21 07:22:58 +02:00
Eric Mastro 4d8d3fb0e8
feat: Add edit communities (#2229)
* feat: Add edit communities

Allow Communities to be edited, including display name, description, color, membership, and permissions.

* Added EditCommunity request type

* Fix lint errors

* Allow editing community without changing image

Previously, retaining an existing community image was not possible because the existing community image path had to be provided in the `editCommunity` RPC call to retain the image. However, once the image is processed by status-go, it is encoded as a base64 string and therefore it is not possible to get the original file path back from this string.

This commit allows for the original to be retained by passing an empty string for the image field in the RPC call.

* Don't change permissions. Fixed clock updating

Co-authored-by: Volodymyr Kozieiev <vkjr.sp@gmail.com>
2021-05-18 15:32:15 -04:00
Pascal Precht dd49e604d4 feat: introduce new `joined` property in `Chat` struct
This property is useful for clients to know when a channel or chat
was joined so they can use that to calculate the order of channels
and chats shown in applications.

Changes include a new joined property on the Chat struct,
as well as adjustments in the persistence layer to retreive and
update chat data in the database.

In addition there's a migration script that alters the existing
chat table to introduce a new column for the joined field.
It also updates all existing rows in the database to set `joined`
to `0`.
2021-05-18 11:29:03 +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
Roman Volosovskyi 6037570901
[wallet] Pending transactions API 2021-04-23 18:20:38 +03:00
Andrea Maria Piana 3e80b1ecaa Dont show notification from inactive chats 2021-04-23 08:16:35 +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
Samuel Hawksby-Robinson 6d7028a8d9
Added Anonymous Metrics Send Opt-In Setting (#2195)
* Added anon metrics send opt in setting

* resolved rebase conflict, renamed migration to use unixtimestamp

Theres always conflicts with migrations using sequential numbers, less so with unix timestamp
2021-04-13 14:00:18 +01:00
Shivek Khurana 79bf90e990
👮🏽‍♂️ Update validators and add a new event (#2189)
* Add extra event to capture other type of navigations, allow empty screen name, rename cofx to get rid of clj ns, update tests

* Some view ids are greater than 16 characters. Made it 32 to be safe.

* Tab navigation events occur outside nav, add a new validator for them

* Remove navigate to cofx event, capture screens on will focus, get rid of enum and make valid screens a string less than 32 characters

* Run make generate

* Fix test

* Bump version to 0.75.1
2021-04-12 17:55:53 +05:30
Shivek Khurana 9ef4971fe1
Comment out Medium unfurling (#2193) 2021-04-12 14:49:34 +05:30
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 d22182ea82 Ban user from community
This commit introduces a new endpoint to ban a user from a community.

Messages from this user will be ignored.
2021-03-24 09:29:21 +01:00
Shivek Khurana 1097b14a7f
🎭 📊 Anonymous Metrics V0 (#2170)
* Migrations in place, how to run them?

* Remove down migrations and touch database.go

* Database and Database Test package in place, added functions to get and store app metrics

* make generate output

* Minor bug fix on app metrics insert and select

* Add a validation layer to restrict what can be saved in the database

* Make validation more terse, throw error if schema doesn't exist, expose appmetrics service

* service updates

* Compute all errors before sending them out

* Trying to bring a closjure to appmetrics go

* Expose appmetrics via an api, skip fancy

* Address value as Jason Dawt Rawmasage to ease parsing

* Introduce a buffered chan with magic cap of 8 to minimize writes to DB. Tests for service and API. Also expose GetAppMetrics function.

* Lint issues

* Remove autoincrement, undo waku.json changes, fix error being shadowed, return nil where nil ought to be returned, get rid of buffered channel

* Bump migration number

* Fix API factory usage

* Add comment re:json.RawMessage instead of strings

* Get rid of test vars, throw save error inside the loop

* Update version

Co-authored-by: Samuel Hawksby-Robinson <samuel@samyoul.com>
2021-03-17 18:09:28 +05:30
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
Roman Volosovskyi a7f2e94999
[wallet] Store account's last known balance and nonce 2021-03-15 16:18:12 +02:00
Andrea Maria Piana e29cca667a linting 2021-03-05 16:05:56 +01:00
andrey 38b0401acd fix bug from status-react 2021-03-05 16:05:56 +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 31b9a924ce Fix image messages being dropped in profile chats
It looks like profile chats are created as public chats, and the code
will drop messages for it.

This commit fixes the issue by checking for the "@" prefix in profile
chat names, until we fix the issue by migrating those chats.
2021-02-15 20:07:41 +01:00
Andrea Maria Piana 6ac1c43926 Add status.im and medium.com to link unfurling 2021-02-15 11:51:14 +01:00
Andrea Maria Piana add5040b48 Drop image messages in public chats
Currently image messages are actually displayed, we only prevent
sending.
This commit changes the behavior so that we drop them.
2021-02-15 08:47:41 +01:00
Andrea Maria Piana eec9518825
Revert "Revert "fix protocol.MessageNotificationBody marshalling""
This reverts commit cf0a16dff1.
2021-02-05 16:48:46 +02:00
Andrea Maria Piana 84db2fb472
Revert "Revert "Expand Local Notifications to support multiple Notification types (#2100)""
This reverts commit 5887337b88.
2021-02-05 16:48:45 +02:00
Shivek Khurana 8d9b85f103 Fix linting 2021-02-05 15:12:38 +01:00
Shivek Khurana 0feab5c6a7 Handle media.giphy.com and expose dimensions of gifs 2021-02-05 15:12:38 +01:00
Shivek Khurana 757dbcd98e Change giphy short url, was gph.is but was using gph.se 2021-02-05 15:12:38 +01:00
Shivek Khurana 4b5dbc3d52 Fixed linting 2021-02-05 15:12:38 +01:00
Shivek Khurana ad6229bc4f Follow short urls to get long url and then use that long url with oembed 2021-02-05 15:12:38 +01:00
Shivek Khurana 499f1702d1 Whitelist media.giphy.com 2021-02-05 15:12:38 +01:00
Shivek Khurana 55f7ad7496 Make errors start with lower case 2021-02-05 15:12:38 +01:00
Shivek Khurana 3fb75919ce Go linter thinks that I'm a 12 year old going on a solo trip to China 2021-02-05 15:12:38 +01:00
Shivek Khurana 12a47b7893 Ignore Giphy load balancer urls 2021-02-05 15:12:38 +01:00
Shivek Khurana 63a6c917fe if -> switch/case 2021-02-05 15:12:38 +01:00