54 Commits

Author SHA1 Message Date
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
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
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
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
0da5e621ac test(persistence): improve reply test to test deleted reply 2023-01-10 15:34:48 -05:00
Patryk Osmaczko
3025cdcba4 feat: add FirstUnseenMessageID API 2022-12-14 09:49:54 +01:00
Jonathan Rainville
d87ed0e357 fix(community): don't delete chat and messages when leaving community
This creates a smoother experience for users when they leave a community since they can see the exact same messages they had before without having to rely on the mailserver.
2022-12-09 14:43:56 -05:00
yqrashawn
68d2d6bdfb
feat: delete message for new design (#2922) 2022-11-17 18:11:58 +08:00
Andrea Maria Piana
a89f4b2d71 Add read/unread messenger functions for activity center 2022-10-26 17:19:44 +01:00
Andrea Maria Piana
bef211b5d6 Send all encryption keys 2022-10-20 12:19:44 +01:00
Pascal Precht
b01a861e8e feat: add DiscordMessageAttachment types and APIs
This adds a new `DiscordMessageAttachment` type which is part of
`DiscordMessage`. Along with that type, there's also a new database
table for `discord_message_attachments` and corresponding persistence
APIs.

This commit also changes how chat messages are retrieved.
Here's why:

`DiscordMessage` can have multiple `DiscordMessageAttachment`.
A chat message can have a `DiscordMessage`.

Because we're `LEFT JOIN`'ing the discord message attachments into the
chat messages, there's a possibility of multiple rows per message.

Hence, this commit ensures we collect queried discord message
attachments on chat messages.
2022-09-29 11:38:29 +02:00
Richard Ramos
bf9abfc350
feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
Pascal Precht
bca26fbdd9 tests(persistence): add missing test for author payload API 2022-09-27 14:45:58 +02:00
Pascal Precht
9ee2967e78 feat(message_persistence): add discord message author image payload fields
This also adds some persistence APIs to operate on the new field (later
needed for the discord imoprt tool)
2022-09-19 13:47:16 +02:00
Patryk Osmaczko
65be6f2b96 feat: add and distribute chatIdentity.FirstMessageTimestamp
`FirstMessageTimestamp` enables members of the community to determine if
there are any messages they can fetch on the community channel(chat).

`FirstMessageTimestamp` is advertised by admin for each community chat
through `CommunityDescription`. It assumes admin is online frequently
enough to capture the first channel message.

For existing communities admin determines first message timestamp by
finding oldest chat message in its local database.

task: status-im/status-desktop#6731
2022-09-09 08:59:39 +02:00
Pascal Precht
16feb64671 fix(message_persistence): ensure discord message author id is stored correctly 2022-08-25 11:51:50 +02:00
Patryk Osmaczko
4143de3816 feat: add social links
iterates: #2782
2022-08-16 14:29:00 +02:00
Pascal Precht
081974da1e feat: add discord_messages table and persistence APIs
This adds a new `discord_messages` table and extends the persistence
APIs such that `MessagesByID` and `MessageByID` will return user
messages that include their discord message payload.

It also adds APIs to save individual discord messages.
2022-08-11 10:49:23 +02:00
Pascal Precht
d0e0deac95 feat: introduce discord_message_authors persistence APIs
This introduces a new table to store discord message authors.
The main reason this table is being introduce is so that we don't have
to duplicate discord message author information in the `user_messages`
table when importing discord communities (ongoing work).

In addition to the table there are also two new APIs on the messenger
persistence layer (which are later used in the import logic):

- `HasDiscordMessageAuthor`
- `SaveDiscordMessageAuthor`

Closes #2759
2022-08-10 10:13:55 +02:00
530f3c7a3a
rename status-react to status-mobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-17 15:37:14 +02:00
Andrea Maria Piana
8a5f77dc37 Address linter issues 2022-03-28 13:14:12 +01:00
andrey
01b6988260 QuotedMessage image from http server 2022-03-21 10:33:08 +01:00
Andrea Maria Piana
612d8918ea Fix notification query 2021-12-10 15:36:59 +00:00
Roman Volosovskyi
3564630c33
Allow sending messages offline (non-datasync messages) 2021-12-07 12:12:49 +02:00
Pascal Precht
df30c06163 feat: add API to mark activity center messages as unread 2021-11-16 12:14:32 +01:00
Roman Volosovskyi
0c0e02e93a
Return counter for messages with mention which are marked as seen 2021-08-31 11:49:40 +03: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
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 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
Andrea Maria Piana
c739f73f49 Add activity center & messages from contacts only 2021-04-16 20:42:40 +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
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
b331b61807 Add ClearHistory & DeactivateChat methods 2021-01-11 13:36:05 +01:00
Samuel Hawksby-Robinson
b3187abce1 Fix for int64 pointer bug 2020-12-17 14:10:00 +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
a77a40fdf4 Resolved linting issues 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson
1f1e784d80 Added additional registry testing 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson
7b77ae9eab Fix CI register persistence bug 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson
af7117070f Added protocol register of ChatIdentity last published times per chat
This register is only used for publishing ChatIdentity to public chat
2020-12-17 14:10:00 +01:00
Andrea Maria Piana
f3f6cdcd93 Mark message as seen when hiding
When hiding a message, we want to mark it as seen in order to preserve
the right count
2020-12-15 15:47:02 +01:00
Volodymyr Kozieiev
d4518d7f16
resend emoji reaction (#2088) 2020-12-15 16:43:41 +02:00
Volodymyr Kozieiev
3e446eed8c
Link previews support (#2059) 2020-10-27 19:35:28 +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
Andrea Maria Piana
2e231e690e Fix mark messages seen
If a chat had a last message the persistence call `Chat()` would not
decode `LastMessage` correctly.
This commit fixes the issue.
2020-08-17 13:40:10 +02:00
Andrea Maria Piana
29f25c5486
Use local chat-id for matching messages 2020-07-30 20:20:59 +02:00