Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] When tagging in a group chat, not all members are displayed #2165

Open
tprudentova opened this issue Nov 28, 2024 · 5 comments
Open

[Bug] When tagging in a group chat, not all members are displayed #2165

tprudentova opened this issue Nov 28, 2024 · 5 comments
Assignees
Labels
bug Something isn't working QA::Major

Comments

@tprudentova
Copy link
Collaborator

2.6.10, 2.6.11, tested on Chrome, Safari, Android, linagora.com

  1. Open a group chat. The bug can be reproduced easier in chats that have lots of members
  2. Type @ in the composer
  3. Not all of the members are displayed in the drop-down list (in the video there are 11 members in a chat, only 7 members in a tag list)
    NB: If you go to group info and click "Load more" in the list of members, they will be displayed in tags alright
Screen.Recording.2024-11-28.at.10.57.47.mp4
@tprudentova tprudentova added bug Something isn't working QA::Major labels Nov 28, 2024
@nqhhdev nqhhdev self-assigned this Dec 16, 2024
@nqhhdev
Copy link
Member

nqhhdev commented Dec 17, 2024

  • Call API /members to get Participants
  • How to cache Participants for each room (Hive) ???
  • How to get members when users want to tag
  • How to get members when users want to display members in chat details
  • How to sync cache with server

@nqhhdev
Copy link
Member

nqhhdev commented Dec 19, 2024

Update API /members

  • Add at property to parameter requestParticipants func
  • Add not_membership property to parameter requestParticipants func

@nqhhdev
Copy link
Member

nqhhdev commented Dec 19, 2024

How to cache Participants for each room (Hive) ???

  /// Key is a tuple as MultiKey(roomId, userId)
  late LazyBox _roomMembersBox;

  • #Important Only store users in memory, this is log below.

=> Should store all users to localdatabase


HUYNQ::requestParticipants:2024-12-20 09:39:03.441 membershipFilter [Membership.join, Membership.invite, Membership.knock]
HUYNQ::requestParticipants:2024-12-20 09:39:03.441 suppressWarning false
HUYNQ::requestParticipants:2024-12-20 09:39:03.442 cache true
HUYNQ::getParticipants:2024-12-20 09:39:03.443 members length 23
HUYNQ::requestParticipants:2024-12-20 09:39:03.443 participantListComplete false
HUYNQ::requestParticipants:2024-12-20 09:39:03.444  partial false
HUYNQ::getParticipants:2024-12-20 09:39:03.444 members length 23
 2024-12-20 09:39:03.445: [Matrix]         Loading a list of 614 participants for the room !iYnZafYUoXkeVPOSQh:matrix.org.
        This may affect the performance. Please make sure to not unnecessary
        request so many participants or suppress this warning.

HUYNQ::requestParticipantsFromServer:2024-12-20 09:39:04.258 users server length 988
HUYNQ::requestParticipantsFromServer:2024-12-20 09:39:04.264 usersDatabase length 23

@hoangdat
Copy link
Member

  • when a user will be added to local db?

@nqhhdev
Copy link
Member

nqhhdev commented Dec 22, 2024

  • when a user will be added to local db?
  1. imports a dumped session
  for (final key in json[_roomMembersBoxName]!.keys) {
        await _roomMembersBox.put(key, json[_roomMembersBoxName]![key]);
      }
  1. When using store event
storeEventUpdate()

...


if (eventUpdate.content['type'] == EventTypes.RoomMember) {
        await _roomMembersBox.put(
            TupleKey(
              eventUpdate.roomID,
              eventUpdate.content['state_key'],
            ).toString(),
            eventUpdate.content);
      }

Some method using store event

decryptRoomEvent()
setInboundGroupSession()
getEventByPushNotification()
_handleRoomEvents()
requestUser()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA::Major
Projects
None yet
Development

No branches or pull requests

3 participants