Skip to content

Remove kicked members or those who left from mentions suggestions #111

Open
@tomastiminskas

Description

@tomastiminskas

Filter members that left or were kicked from a tribe from mentions suggestion list.

Base branch: develop: project needs to be compiled and run from develop branch where the latest changes are pushed.

Context

  • When typing a message on a tribe and entering @ character followed by a letter, a list of members to tag will show up
  • That list is built processing messages in the tribe and getting aliases from them, removing duplicates and old messages.
  • We want to remove members that were kicked out or who left the tribe from the members suggestions list
  • This logic is implemented in ChatViewModel.kt in processMemberMention method

Requirements

  • Implement logic to filter members from whom the last message is of type 15 or 16 (case groupLeave = 15, case groupKick = 16)
  • If a message with a type different than 15 or 16 was sent after a msg of type 15 or 16, then it must be included since it means the member re joined after being kicked or left
  • As messages are iterated in reverse (which means the latest will go first) we need to check if message.type == 15 or message.type == 16 and matchingMessages doesn't contain a message with the same senderAlias than the message in the curren iteration then add it to a new list of excluded members
  • This new excluded members list should be used to avoid members to be included in matchingMessages in next iteration if they are present in the excluded members list

Acceptance Criteria

  • Prevent old members that were kicked or left the tribe to show up in the mentions suggestions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions