Commit Graph

50 Commits

Author SHA1 Message Date
Samuel Hawksby-Robinson 46157dc4dc
Expand Local Notifications to support multiple Notification types (#2100)
* Initial work on expanding Local Notifications

Adding functionality to support multiple notification types in Notification.Body. Currently have a bug that I think is caused by a the jsonMarshal func not working as intented, need to resolve this next before proceeding

* Fixed json.Marshaller issue and implemented json.Unmarshaller

* Tweak errors, go convention is errors don't begin with capital letters

* Added notificationMessageBody with un/marshalling

Also removed the Body interface

* Added check for bodyType mismatch

* Implement building and sending new message notifications

* Refactor to remove cycle imports

* Resolved linting issue ... Hopefully

* Resolving an implicit memory aliasing in a for loop

* version bump

* Added Notification.Category consts
2021-01-12 14:28:27 +00:00
Andrea Maria Piana b331b61807 Add ClearHistory & DeactivateChat methods 2021-01-11 13:36:05 +01:00
Andrea Maria Piana 06dcf0cea9 Allow emoji reactions 2020-12-23 17:20:55 +01:00
Andrea Maria Piana b4905fdbd4 address feedback 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 69de77c36a return error on nil image 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson fe9e04ca13 Updating debug lvl to info 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 481c9c1287 Added debug to HandleChatIdentity 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 0df825164c Placating the linting old ones 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 5d0906b9d8 Resolving fix for receiving chat identities with empty images map 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 7b2d96de05 Resolved yet more lint 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson b7a7035894 Resolved further linting issues 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 7b230d5c9d Updated message handling from public and private chat 2020-12-17 14:10:00 +01:00
Roman Volosovskyi d20cf2583f
Revert "Allow receiving old messages after rejoining a pubchat"
This reverts commit fa136ebaa7.
2020-11-06 17:09:49 +02:00
Roman Volosovskyi fa136ebaa7
Allow receiving old messages after rejoining a pubchat 2020-11-05 15:13:38 +02:00
andrey b388002771 profile status updates 2020-10-27 14:56:35 +01: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 3c6b741f71
Add tests for send notification & review feedback 2020-09-09 21:22:34 +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 00c5b60d7f
Move message to common namespace 2020-09-09 21:22:12 +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 5910de3683
Handle emoji reaction in group chat 2020-07-30 20:21: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 5a178939de
Use same message with flag for emoji retraction and use compound id 2020-07-30 20:20:37 +02:00
Andrea Maria Piana 2bf1991190
Use reflect.Value as ParsedMessage type and handle type case 2020-07-30 20:20:36 +02:00
Samuel Hawksby-Robinson e9eb05e3d1
Bug fix on HandleMembershipUpdate() 2020-07-30 20:20:32 +02:00
Samuel Hawksby-Robinson 3e857203ac
Created ChatEntity encoding per chat type 2020-07-30 20:20:29 +02:00
Samuel Hawksby-Robinson 6ffe67deec
Added ChatEntity interface and made required changes for its use 2020-07-30 20:20:28 +02:00
Samuel Hawksby-Robinson ceed618102
Updated all MessageType references 2020-07-30 20:20:27 +02:00
Samuel Hawksby-Robinson 9a775619cd
Added basic EmojiReaction handler 2020-07-30 20:20:24 +02:00
Andrea Maria Piana 4b8739a8bc
Polish up and address review feedback 2020-07-27 08:51:28 +02:00
Andrea Maria Piana 3afde67022
Move message processor to common and allow subscribing to sent messages 2020-07-27 08:51:00 +02:00
Andrea Maria Piana 7bbe9561de Set chat active on being re-invited
If the user deletes/leaves a group chat, the chat is set as not active.
This means that if we are re-invited to the chat it won't be shown to
the user.

This commit changes this behavior so that if we are re-invited to the
chat it is set as active again.
2020-04-23 11:04:50 +02:00
Andrea Maria Piana 3c5354280c Return count of updated messages in MarkMessagesSeen
The frontend needs to know if the messaged marked as seen was actually
seen or not, as we might not have it loaded in the frontend.
2020-04-07 13:23:21 +02:00
Adam Babik 17f91b3141
Clean up protocol package (#1890) 2020-03-09 07:19:23 +01:00
Andrea Maria Piana 849492fda9
Add statusUpdate code (#1861)
* Add status-option code

This commits changes the behavior of waku introducing a new status-code,
`2`, that replaces the current single options codes.

* linting
2020-02-21 15:48:53 +01:00
Adam Babik 8b61d92d58
Remove protocol and eth-node submodules (#1835) 2020-02-10 12:22:37 +01:00
Adam Babik d27a507e0d
make Messenger.Timesource public (#1837) 2020-02-07 12:30:26 +01:00
Andrea Maria Piana f2eebd1e49
Verify ENS in the background (#1824)
Currently ENS are verified explicitly by status-react, this is not ideal
as if that fails it will have to be explicilty retried in status-react.
This commits changes that behavior so that ENS are verified in a loop
and updated if new messages are received.
2020-02-05 11:09:33 +01:00
Andrea Maria Piana 456bcfa022
Peg clock value to whisper timestamp (#1804)
This commit pegs the clock value to maximum + 120 seconds from the whisper
timestamp.
In this way the we avoid the scenario where a client makes the timestamp
increase arbitrarely.
2020-01-20 17:44:32 +01:00
Andrea Maria Piana 25d46c6d82
Fix waku tests & contact ens (#1802) 2020-01-17 13:39:09 +01:00
Pedro Pombeiro 7f45c43196 make lint-fix 2020-01-16 13:18:36 +01:00
Andrea Maria Piana c569d8a4ed
Sync installation messages & contact requests (#1791) 2020-01-15 08:25:09 +01:00
Andrea Maria Piana 88a1d0111e
Add Commands (#1731)
This commit adds handling of Transaction commands.
2020-01-10 19:59:01 +01:00
Andrea Maria Piana baa0767c26
Handle membership update message
This commit does a few things:

1) Handle membership updates using protobuf and adds the relevant
endpoints.
2) Store in memory a map of chats + contacts for faster lookups, which
are then flushed to disk on each update
3) Validate incoming messages

Sorry for the large pr, but you know, v1 :)
2019-12-10 15:20:28 +01:00
Andrea Maria Piana fd49b0140e
Move to protobuf for Message type (#1706)
* Use a single Message type `v1/message.go` and `message.go` are the same now, and they embed `protobuf.ChatMessage`

* Use `SendChatMessage` for sending chat messages, this is basically the old `Send` but a bit more flexible so we can send different message types (stickers,commands), and not just text.

* Remove dedup from services/shhext. Because now we process in status-protocol, dedup makes less sense, as those messages are going to be processed anyway, so removing for now, we can re-evaluate if bringing it to status-go or not.

* Change the various retrieveX method to a single one:
`RetrieveAll` will be processing those messages that it can process (Currently only `Message`), and return the rest in `RawMessages` (still transit). The format for the response is:
`Chats`: -> The chats updated by receiving the message
`Messages`: -> The messages retrieved (already matched to a chat)
`Contacts`: -> The contacts updated by the messages
`RawMessages` -> Anything else that can't be parsed, eventually as we move everything to status-protocol-go this will go away.
2019-12-05 17:25:34 +01:00
Pedro Pombeiro ed5a5c154d
Move to monorepo structure (#1684)
Move to a monorepo structure with submodules

- Rename status-protocol-go to status-go/protocol
2019-11-21 17:19:22 +01:00