Commit Graph

1704 Commits

Author SHA1 Message Date
Andrea Maria Piana 1a7a63a8e5 Log on db failure 2020-10-14 08:07:05 +02:00
Andrea Maria Piana 76a37c1b7f Skip flaky test 2020-10-08 13:23:00 +02:00
Andrea Maria Piana b11399ffc6 Use ErrRecordNotFound instead of sql.ErrNoRows
We were checking for the wrong error kind when pulling messages from the
database, which resulted in the code not retrying to pull the message,
giving flaky tests / race condition (that's present in production as
well)
2020-10-08 13:23:00 +02:00
Andrea Maria Piana 34c41d4bc8 bump version 2020-10-08 13:23:00 +02:00
Andrea Maria Piana 1cd9396038 Remove flaky suite api_geth_test 2020-10-08 09:48:06 +02:00
Andrea Maria Piana 916ed1068f Skip bridge flaky test 2020-10-08 09:48:06 +02:00
Andrea Maria Piana efbf093bc4 Don't fail if one request fails in getTokensBalances
If one request failed, the whole batch would fail.
This caused issue as one of the contract is constantly returning an
error now, and essentially there was not way to fetch balance.
Also extend the timeout to 20s as we throw 165 request to Infura in one
go and it takes its time to reply to those, although it seems like we
should batch them on our side instead of sending them all cuncurrently.
2020-10-05 12:53:51 +02:00
Andrea Maria Piana 896f5c24bf Force migration if dirty 2020-10-01 13:47:59 +02:00
Andrea Maria Piana 2aea867cee Migrate journals as well 2020-09-30 12:13:22 +02:00
Andrea Maria Piana 5cb70a2f42 Add datadir to gen_config.sh 2020-09-28 09:51:21 +02:00
Andrea Maria Piana 200273aa0e Count runes and not characters 2020-09-25 14:02:09 +02:00
Andrea Maria Piana 0ba4694f21 [Fix: #2027] Migrate db to shorter path name 2020-09-25 14:02:09 +02:00
Jakub Sokołowski 3d5e21e276 unify format of logs with peerID
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-24 14:58:49 +02:00
andrey 397ee840c6 [#2042] Wrong ERC20 decimal rounding in "Set max" 2020-09-22 16:00:47 +02:00
andrey 682722b973 add wallet favourites 2020-09-21 10:48:00 +02:00
Andrea Maria Piana 36e742cb70 Bump version to 0.60.1 2020-09-17 12:10:26 +02:00
Andrea Maria Piana a759d9dd67 Fix push notification & mentions
The code had an issue where it would not register a chat if just joined
as re-register push notifications was called before the chat had been
added.
This commit fixes the behavior by making sure that the chat just joined
is included.
2020-09-17 07:35:18 +02:00
Gheorghe Pinzaru 9e148eab89
Dont allow disabling waku (#2040) 2020-09-16 10:31:01 +03:00
RichΛrd 62c9d56fe8
Add API functions to store pending transaction data (#2037)
* Add API functions to store pending transaction data
* fix: code review
2020-09-14 09:39:24 -04:00
Volodymyr Kozieiev 8f83c5f462
Add `allow permission request` field to settings (#2035)
Add settings field webview-allow-permission-requests?
2020-09-10 13:22:30 +03:00
Andrea Maria Piana 61b345ff33 Add index on seen & hide long messages
This commit does two things:
1) Add an index on seen & update only the not-seen messages in the query
2) Hide long messages in the database, as that's likely spam
2020-09-10 10:26:59 +02:00
Andrea Maria Piana e836ffb47f Soft blacklist peer ids
Why make this change?

This change is useful so we can blacklist peer ids, without actually
disconnecting them, so that it's harder for them to tell that they are
being blacklisted. Envelopes will just be dropped.

What has changed?

In waku we pass a config with a list of hex-encoded peer ids, and we
check that against newly received envelopes.
If so we just drop the envelope and return
2020-09-09 22:57:15 +02:00
Andrea Maria Piana 19a82f68ad
Merge branch 'feature/push-notification-mentions' into develop 2020-09-09 22:11:08 +02:00
Andrea Maria Piana 3c6b741f71
Add tests for send notification & review feedback 2020-09-09 21:22:34 +02:00
Andrea Maria Piana 28e06daf6d
Dont sent messages to user who have not joined 2020-09-09 21:22:18 +02:00
Andrea Maria Piana 2d525f9503
Set block mentions 2020-09-09 21:22:17 +02:00
Andrea Maria Piana 4e18d21129
Re-register on adding or removing a chat 2020-09-09 21:22:16 +02:00
Andrea Maria Piana 0d998e1858
Show correct text in case of mentions 2020-09-09 21:22:15 +02:00
Andrea Maria Piana 18877cae6f
Handle mentions on server 2020-09-09 21:22:14 +02:00
Andrea Maria Piana 8ee3c75510
Support for basic push notification for mentions 2020-09-09 21:22:13 +02:00
Andrea Maria Piana 00c5b60d7f
Move message to common namespace 2020-09-09 21:22:12 +02:00
Andrea Maria Piana 7d5d413222
Add parsing and storing of mentions 2020-09-09 21:22:07 +02:00
Roman Volosovskyi 57728224d4
[mentions] ParsedText in quoted message
ParsedText is needed to properly display mention in quoted message.
2020-09-09 16:07:31 +03:00
Andrea Maria Piana 32b0af8ecc Add index to emoji reactions 2020-09-09 15:02:54 +02:00
Jakub Sokołowski 7ba89867ac ci: keep only last 10 builds to reduce size
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-08 19:49:24 +02:00
andrey 3b748a2e46 group chat invitation 2020-09-07 12:15:58 +02:00
andrey 2eaa1fcad7 [#11046] Add local contact names 2020-09-07 11:34:06 +02:00
Volodymyr Kozieiev 88a3022ea8
Drop messages with text longer than 4096 characters (#2029) 2020-09-01 17:38:36 +03:00
Andrea Maria Piana b67ce580d0
Merge branch 'feature/enable-push-notifications' into develop 2020-09-01 10:42:07 +02:00
Andrea Maria Piana 4a87764cca
seed mrand 2020-09-01 10:31:12 +02:00
Andrea Maria Piana 2ef1aa89f4
Handle connection change
Currently messenger has no notion of being online.
This might cause a problem as we retry to register with a push
notification server even if not connected to any peer, which will
inevitably fail.
This commit adds a method `handleConnectionChange` that will be called
every time the connection change state.
2020-08-27 18:54:31 +02:00
Andrea Maria Piana 0ff2542939
Don't add contact on update
When sending a contact update we automatically added the contact,
but that resulted in the contact not being synced correctly as
`saveContact` will not trigger the side effects.

For now I have removed this behavior. Ideally we should have a single
call that handles the side effects, but for that ENS names should be
stored in messenger, so we can propagate it.
2020-08-27 18:54:30 +02:00
Andrea Maria Piana 640f5533ca
handle notifications at-most-once 2020-08-27 18:54:29 +02:00
Andrea Maria Piana d7222c89e0
shuffle servers and limit & filter by chat id 2020-08-27 18:54:28 +02:00
Andrea Maria Piana 401d18e558
Enabled push notifications by default and add fleet 2020-08-27 18:54:06 +02:00
Andrea Maria Piana 4e9928ab5f Don't log chat as it makes status-desktop blow up
For some reason when calling saveChat from desktop with `lastMessage`
set to null, a sigsev is received.
The issue seems to be in logFormat
05280a7ae3/log/format.go (L356)
which for some reason blows up if passed a nil pointer (`lastMessage`).
Can't replicate on any other platform or running it locally, but hey,
this fixes the issue.
2020-08-27 17:27:01 +02:00
Andrea Maria Piana 56c0142f16 Honor FullNode config in waku
previously FullNode would only result in setting a bloom filter to full.

This behavior caused issues as you effectively cannot install a filter
on a FullNode, as it would advertise the new topic/bloom filter and stop
receiving all the messages.

This caused an issue when running push notifications servers together
with mailservers, also the behavior is a bit counter-intuitive as I
would expect the FullNode config to be honored no matter of what filters
are installed.
2020-08-26 14:11:13 +02:00
Michael Bradley, Jr 2332e5f537 implement Makefile target for builing status-go as a shared library
A shared library is useful for libstatus consumers that experience collision of
exported symbols during static linking.

It was discovered that on Windows `"-Wl,--export-all-symbols"` needs to be
supplied in `CGO_LDFLAGS` when building the shared library else the expected
symbols will not be found in `libstatus.dll`.
2020-08-26 12:22:20 +02:00
Jakub Sokołowski 3996aa7853 node-canary: switch to using Waku instead of Whisper
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-26 09:25:54 +02:00
Andrea Maria Piana d09eaeacb8 Allow node to start a push notification server
This commit allows a node to start a push notification server.
If the config is set it will start a messenger with a corresponding pn
server.
2020-08-20 10:54:33 +02:00