Commit Graph

58 Commits

Author SHA1 Message Date
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 c739f73f49 Add activity center & messages from contacts only 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
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 f115b8d289 Request/Decline access to communities 2021-02-26 15:35:43 +01:00
Volodymyr Kozieiev c38439e664
Listen for delivered messages (#2150) 2021-02-23 17:47:45 +02: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 fb6411af24
Use personal topic for push notification registration
One of the issues we noticed is that the partitioned topic
in push notification is heavy in traffic, as any user using a particular
mailserver will use that partitioned topic to register for PNs.

This commit moves from the partitioned topic to the personal topic of
the PN server, so it does not clash with other users that might happen
to have the same partitioned topic as the mailserver, resulting in long
sync times.

Another issue that will need to be addressed separately is that once you
send a message to a topic, because of the way how waku/whisper works,
you will have to register to that topic, meaning that you will receive
that data. Currently waku does not support unsubscribing from a topic
without logging in and out, so that needs also to be addressed.
2021-01-26 09:39:53 +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
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 b5b1e19c24 Add ProfilePicturesVisibility 2021-01-15 13:39:13 +01:00
Andrea Maria Piana 6f088bb5c5 Fix communities migration
In some instances the communities migration would be skipped but not
marked as `dirty`.

This commit addresses the issue by:
- Making sure that if dirty is set the migration is not skipped but
replayed
- If the version is on the communities migration and dirty is false, we
check for the presence of the communities table. If not present we
replay the communities migration.
- Make community_id field in user_messages nullable

It also removes all the `down` migration, as we can't use them
effectively, as explained in the README.md added.
2021-01-08 08:43:16 +01:00
Andrea Maria Piana a0d5f66c8f Leave import community data 2020-12-23 17:20:55 +01:00
Andrea Maria Piana 5d929c3584 Handle organisation membership requests 2020-12-23 17:20:55 +01:00
Andrea Maria Piana 31a885ced8 remove photo path in favor of images in contact 2020-12-17 14:10:00 +01:00
Andrea Maria Piana 1adfa38611 Check hash in shouldPublish 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 056649fd73 Changed identity image migration 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 5426fac0a3 Added CHAT_IDENTITY application meta type
also make generate
2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson e8d883edb6 bindata for profile_image migrations 2020-12-17 14:10:00 +01:00
Volodymyr Kozieiev d4518d7f16
resend emoji reaction (#2088) 2020-12-15 16:43:41 +02:00
Jonathan Rainville b2d8f7f416
feat: add bookmarks table for the browser bookmarks
plus get bookmark icon using a lib
2020-11-16 13:31:34 -05:00
Volodymyr Kozieiev 3e446eed8c
Link previews support (#2059) 2020-10-27 19:35:28 +02:00
andrey b388002771 profile status updates 2020-10-27 14:56:35 +01:00
Andrea Maria Piana 896f5c24bf Force migration if dirty 2020-10-01 13:47:59 +02: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 7d5d413222
Add parsing and storing of mentions 2020-09-09 21:22:07 +02:00
Andrea Maria Piana 32b0af8ecc Add index to emoji reactions 2020-09-09 15:02:54 +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
Andrea Maria Piana 29f25c5486
Use local chat-id for matching messages 2020-07-30 20:20:59 +02:00
Andrea Maria Piana 3e4e1ff663
update migrations 2020-07-30 20:20:39 +02:00
Andrea Maria Piana 5a178939de
Use same message with flag for emoji retraction and use compound id 2020-07-30 20:20:37 +02:00
Samuel Hawksby-Robinson eb562122b6
Added general protobuf umarshaller function 2020-07-30 20:20:23 +02:00
Samuel Hawksby-Robinson 241439e56b
make generate 2020-07-30 20:20:16 +02:00
Samuel Hawksby-Robinson f6594cc306
make generate for new emoji reaction table 2020-07-30 20:20:08 +02:00
Samuel Hawksby-Robinson 8cff21d254
make generate 2020-07-30 20:20:02 +02:00
Andrea Maria Piana 8716a8ce45
add audio duration 2020-07-27 17:15:10 +02:00
Andrea Maria Piana e58ba1e9c8
Add audio messages
Why make this change?

We are adding support of audio recorded files, similarly to how we did
with images

What has changed?

- Added protobuf definition, only AAC supported
- Added migrations to store files
- Fixed an issue with nil pointer when transaction would fail to be
created, causing the application to crash
2020-07-27 17:14:50 +02:00
Andrea Maria Piana 4b8739a8bc
Polish up and address review feedback 2020-07-27 08:51:28 +02:00
Andrea Maria Piana 12a3c5a31a
Add version to notification info 2020-07-27 08:51:18 +02:00
Andrea Maria Piana be1800f2ec
drive settings from client 2020-07-27 08:51:14 +02:00
Andrea Maria Piana c4fa9825a9
Mute chat 2020-07-27 08:50:46 +02:00
Andrea Maria Piana 20f45a7c1c Create different index for filtering
The index for message was fairly inefficient as it was only using the
cursor, as it was referring to the old `chat_id` field.

This meant that newer messages would be fetched much faster then older
messages.

The index has been changed so that now it includes `local_chat_id`
(which is currently used for filtering), and not using `hide`.

The reason being is that `hide` is a low cardinality index, so there's
no performance benefit to have it in, also it's mostly ignored by the
query planner.

This commit also adds the missing migrations, we generated the file, but
the source was missing, probably I forgot to add them in a rebase. They
have been generated from the migration file, using `RestoreAsset`.
2020-06-08 10:02:31 +02:00
Andrea Maria Piana f5ab58b87f Add support for images
This commit adds support for images in protobuf messages.

The client can specify a path which will be used to load the image
and set the corresponding fields.

This makes the assumption that the RCP server runs on the same machine
as the client and they have access to the same files. This holds
currently for both status-react and status-console-client, we could
revisit and adds an upload if that changes in the future.
2020-06-01 11:30:04 +02:00