filtered deleted messages from search and chat view, refactored chat bubble styling for deleted comments, and updated tests

This commit is contained in:
2026-05-09 22:28:26 +02:00
parent 7d02e70459
commit 79a6d9a594
4 changed files with 65 additions and 35 deletions
+32 -22
View File
@@ -105,28 +105,38 @@ void main() {
);
});
test('reaction and poll_voted system messages are filtered out', () {
final response = _response([
_msg(
id: 1,
timestamp: 100,
message: 'Treffer',
systemMessage: 'reaction',
type: GetRoomResponseObjectMessageType.system,
),
_msg(
id: 2,
timestamp: 200,
message: 'Treffer',
systemMessage: 'poll_voted',
type: GetRoomResponseObjectMessageType.system,
),
_msg(id: 3, timestamp: 300, message: 'Treffer'),
]);
final matches = ChatSearchController.findMatches(response, 'Treffer');
expect(matches.length, 1);
expect(matches.first.messageId, 3);
});
test(
'reaction, poll_voted and message_deleted system messages are filtered out',
() {
final response = _response([
_msg(
id: 1,
timestamp: 100,
message: 'Treffer',
systemMessage: 'reaction',
type: GetRoomResponseObjectMessageType.system,
),
_msg(
id: 2,
timestamp: 200,
message: 'Treffer',
systemMessage: 'poll_voted',
type: GetRoomResponseObjectMessageType.system,
),
_msg(
id: 4,
timestamp: 250,
message: 'Treffer',
systemMessage: 'message_deleted',
type: GetRoomResponseObjectMessageType.system,
),
_msg(id: 3, timestamp: 300, message: 'Treffer'),
]);
final matches = ChatSearchController.findMatches(response, 'Treffer');
expect(matches.length, 1);
expect(matches.first.messageId, 3);
},
);
test('rich object parameters are searchable (e.g. file names)', () {
final response = _response([