Commit Graph

32 Commits

Author SHA1 Message Date
Mykhailo Prakhov e4c1abb5ce
fix: validate display name on account creation (#4994) 2024-03-28 16:57:59 +01:00
Michal Iskierko 73a5189398 feat(BridgeMessage): Add new type of chat message content: BridgeMessage
BridgeMessage is a type of chat message content which will be sent from  Matterbridge.
It contains fields:
- bridge name - depends on the used bridge, eg. "discord", "slack", etc...
- user name - username the message was received from
- content - message content
- user avatar
- message id
- parent message id - used in case of replies

Message is saved to a separated table: bridge_messages, similarly to discord messages.
The user_messages table is untouched.
bridge_messages table contains user_messages_id in order to join with user_messages table.

Issue #13098
2024-01-30 12:14:54 +01:00
Godfrain Jacques 5f6f7e502d
(fix/status-go) fix profile picture update/removal (#4570)
This PR fixes [9947](status-im/status-desktop#9947) and contains :

    - Commit to fix the changing of custom picture and having the change
      reflected on contact's side
    - Commit to fix the deleting of picture and having the change reflected
      on contact's side
    - Rename confusing `ImageType` to `ImageFormat`
2024-01-24 12:09:28 -08:00
Andrea Maria Piana 8dd1b66d69 Always use protobufs by reference & generate handlers 2023-08-22 12:08:54 +01:00
Mikhail Rogachev 8bcc493477
Fix: mutual state messages behaviour (#3640)
* feat: don't remove sent mutual state messages on accepting a CR

* fix: don't send mutual state message for a new contact

* chore: move mutual state messages to `addContact`

* fix: use one chat for mutual state messages and contact requests

* fix: change `added` mutual state updatede messages to `accepted`

* feat: Use different content type for each mutual state event system message

* chore: use constants for mutual event system messages test, review fixes

* chore: fix tests related to local contacts map
2023-07-12 11:12:58 -04:00
Mikhail Rogachev 8589a525a5
Add system message for mutual contact state updates (#3519)
* feat: add mutual state update system message

* feat: send mutual state update on accepting CR

* feat: send mutual state update when removing a contact

* fix: don't send MutualStateUpdateMessage over wire

* fix: mutual state update message text fixed

* fix: new clock to ensure system message after CR and add chat to the response

* feat: add AC notification for contact removal

* feat: replace "sent" mutual state system message with "added"
2023-06-08 16:00:19 +04:00
Andrea Maria Piana 7650f3003e Fix some issues with pinned messages
There were a couple of issues on how we handle pinned messages:

1) Clock of the message was only checked when saving, meaning that the
   client would receive potentially updates that were not to be
   processed.
2) We relied on the client to generate a notification for a pinned
   message by sending a normal message through the wire. This PR changes
   the behavior so that the notification is generated locally, either on
   response to a network event or client event.
3) When deleting a message, we pull all the replies/pinned notifications
   and send them over to the client so they know that those messages
   needs updating.
2023-04-25 16:02:48 +01:00
Boris Melnik 6666110ba4
feat(images): Add albumId to images album and allow to receive image messages without a text (#3287) 2023-03-23 19:06:50 +03:00
Pascal Precht 0bdb596d3b feat: introduce discord import tool 2022-10-28 09:52:26 +02:00
yqrashawn f47cb8572d
feat: delete for me (#2866) 2022-09-28 19:42:17 +08:00
Richard Ramos 50ec6f97e0 feat: display name 2022-03-14 13:48:34 -04: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
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
Samuel Hawksby-Robinson 5a4e23a0ea Fix protobuf ImageType change 2020-12-17 14:10:00 +01:00
Andrea Maria Piana 200273aa0e Count runes and not characters 2020-09-25 14:02:09 +02:00
andrey 3b748a2e46 group chat invitation 2020-09-07 12:15:58 +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 29f25c5486
Use local chat-id for matching messages 2020-07-30 20:20:59 +02:00
Samuel Hawksby-Robinson ceed618102
Updated all MessageType references 2020-07-30 20:20:27 +02:00
Samuel Hawksby-Robinson ae1e6db883
Removed original iteration 2020-07-30 20:20:11 +02:00
Samuel Hawksby-Robinson 073ff0b6af
Added message validator tests for emoji reactions 2020-07-30 20:19:59 +02:00
Samuel Hawksby-Robinson a0e7e0751c
Added emoji reaction message type validation 2020-07-30 20:19:58 +02:00
Samuel Hawksby-Robinson 154a169ffb
Moved message.ContentType base checks to a switch 2020-07-30 20:19:57 +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 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
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 88a1d0111e
Add Commands (#1731)
This commit adds handling of Transaction commands.
2020-01-10 19:59:01 +01:00
Pedro Pombeiro c8a911ebd1 Use goimports instead of gofmt 2020-01-06 10:17:23 +01:00
flexsurfer 9a656fe151 Fix sticker pack with id = 0 (#1749) 2019-12-20 10:35:07 +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