Commit Graph

32 Commits

Author SHA1 Message Date
Patryk Osmaczko 0465ab668d fix: populate API Chat with channel members 2023-07-27 11:35:59 +02:00
Pascal Precht b8b402da8d feat: store check channel permission responses
This commit adds new tables to the database and APIs in `Messenger` and
communities `Manager` to store `CheckChannelPermissionsResponse`s.

The responses are stored whenever channel permissions have been checked.

The reason we're doing this is so that clients can retrieve the last
known channel permission state before waiting for onchain checks to
finish.
2023-06-27 12:13:59 +02:00
Jonathan Rainville a46bf97bf3
fix(chat/api): don't count muted chats' unviewed count unless mentioned (#3619) 2023-06-16 14:10:04 -04:00
Mykhailo Prakhov e058b50a2e
feat: community admin permission functionality (#3569)
* feat: community admin implementation

* fix: code review fixes

* chore: request admin permissions in CheckPermissionToJoin, unit test fix
2023-06-14 10:15:46 -04:00
Jonathan Rainville e7fbc191f4
refactor(chat/api): re-add chats in the getChannelGroups api (#3439)
* refactor(chat/api): re-add chats in the getChannelGroups api

* feat(chat/api): add GetChannelGroupById api function
2023-05-02 13:54:44 -04:00
Jonathan Rainville e5093124f2 fix(chat-api): fix unread count on channelGroup condition 2023-04-13 10:04:18 -04:00
Patryk Osmaczko d077c7e4bd fix: make `GetChatsByChannelGroupID` return chats with members
fixes: status-im/status-desktop#10066
2023-03-30 16:02:10 +02:00
mprakhov 303197fbd0 fix: add 'responeTo' parameter for the SendImages API 2023-03-30 15:20:41 +02:00
Jonathan Rainville becc49ac24 Revert "Revert "refactor(chat/api): change getChats to getChannelGroups""
This reverts commit c86d42d930.
2023-03-24 11:43:38 -04:00
Jonathan Rainville c86d42d930 Revert "refactor(chat/api): change getChats to getChannelGroups"
This reverts commit daa926f748.
2023-03-23 15:24:21 -04:00
Jonathan Rainville daa926f748 refactor(chat/api): change getChats to getChannelGroups
Also adds getChannelGroupByID
2023-03-23 11:37:41 -04:00
Michal Iskierko 1b24342a75 feat(CommunityTokenMetadata): Keep token metadata in CommunityDescription
Community tokens has some metadata (image, description) which must be kept in waku(CommunityDescription).
Add CommunityTokenMetadata message to communities.proto.
Add []CommunityTokenMetadata to CommunityDescription.

Issue #9545
2023-03-07 08:40:47 +01:00
Mykhailo Prakhov 45c5fd1cdf chore: allow GetMembers for the communty by communityID only 2023-01-23 19:13:22 +02:00
Omar Basem d1a4b53d5c
Remove group members (#3011)
* remove list of members from group
2022-12-10 08:26:51 +04:00
Richard Ramos d4d35710be fix: community encryption was not being marshalled 2022-10-10 13:11:10 +02:00
Patryk Osmaczko 73a45dd58e feat: add `SpectateCommunity` api
- added `SpectateCommunity` endpoint, it is supposed to be used in
  scenarios where we want to "Go to public Community" and see its
  content without joining
- added `spectated` field to `Community`, it means we are observing the
  community and its chats but we are not members

Use case:
https://github.com/status-im/status-desktop/issues/7072#issuecomment-1246560885
2022-10-06 21:21:37 +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
Michal Iskierko e3f451cd79 feat: Handle image in group chat
Add image_payload column to chats table.
Add Base64Image to chat struct.
Add ImageChange event to propagate image.
Change EditChat API - use CroppedImage.
Process and crop image in EditGroupChat.
2022-09-01 12:19:01 +02:00
Michal Iskierko 31671ea040 feat: distribute color info when creating group chat or changing chat color
Regenerating protocol protobuf files - membership_update_message.proto change.

Issue #5982
2022-08-08 10:33:38 +02:00
Michal Iskierko 72d2a97449 feat: unban user in community
Issue #2724
2022-07-04 09:02:33 +02:00
Richard Ramos 2873e65a61
feat: community tags (#2708)
Signed-off-by: Richard Ramos <info@richardramos.me>

Co-authored-by: MishkaRogachev <mishkarogachev@gmail.com>
2022-06-24 09:40:12 -04:00
Richard Ramos 9430f494be
fix: handle nil descriptions in communities for chat_getChats (#2694) 2022-06-08 08:46:52 -04:00
Patryk Osmaczko 5df5d6b519 feat: remove explicit group chat join
relates: #status-im/status-desktop/5717
2022-06-08 11:48:45 +01:00
Patryk Osmaczko ee7025a573 feat: add intro/outro message to communities 2022-05-31 11:41:26 +02:00
Jonathan Rainville 6691516903
fix(getChats-api): add members to ChannelGroup object instantiation (#2625) 2022-04-04 15:59:46 -04:00
Jonathan Rainville 391ef8a65e
fix(chat-api): fix getChats functions (#2610) 2022-04-01 18:39:25 -04:00
Samuel Hawksby-Robinson e67592d556
Sync Settings (#2478)
* Sync Settings

* Added valueHandlers and Database singleton

Some issues remain, need a way to comparing incoming sql.DB to check if the connection is to a different file or not. Maybe make singleton instance per filename

* Added functionality to check the sqlite filename

* Refactor of Database.SaveSyncSettings to be used as a handler

* Implemented inteface for setting sync protobuf factories

* Refactored and completed adhoc send setting sync

* Tidying up

* Immutability refactor

* Refactor settings into dedicated package

* Breakout structs

* Tidy up

* Refactor of bulk settings sync

* Bug fixes

* Addressing feedback

* Fix code dropped during rebase

* Fix for db closed

* Fix for node config related crashes

* Provisional fix for type assertion - issue 2

* Adding robust type assertion checks

* Partial fix for null literal db storage and json encoding

* Fix for passively handling nil sql.DB, and checking if elem has len and if len is 0

* Added test for preferred name behaviour

* Adding saved sync settings to MessengerResponse

* Completed granular initial sync and clock from network on save

* add Settings to isEmpty

* Refactor of protobufs, partially done

* Added syncSetting receiver handling, some bug fixes

* Fix for sticker packs

* Implement inactive flag on sync protobuf factory

* Refactor of types and structs

* Added SettingField.CanSync functionality

* Addressing rebase artifact

* Refactor of Setting SELECT queries

* Refactor of string return queries

* VERSION bump and migration index bump

* Deactiveate Sync Settings

* Deactiveated preferred_name and send_status_updates

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-03-23 18:47:00 +00:00
Richard Ramos a15c27c588 feat: unified chat API pt. 3 (#2535) 2022-03-03 15:37:07 -04:00
Richard Ramos f9b87c4ae1 fix: add missing information 2022-03-03 15:37:07 -04:00
Richard Ramos 0f423e262d fix: code review 2022-03-03 15:37:07 -04:00
Richard Ramos df9c9977a5 feat: unified chat API pt. 2 2022-03-03 15:37:07 -04:00
Richard Ramos 41d523f205 fix: code review 2022-03-03 15:37:07 -04:00