Philipp Hörist pushed to branch reactions at gajim / gajim
Commits:
409e9c8d by Philipp Hörist at 2024-05-12T10:19:25+02:00
imprv: Limit emoji count
- - - - -
1 changed file:
- gajim/common/modules/reactions.py
Changes:
=====================================
gajim/common/modules/reactions.py
=====================================
@@ -61,6 +61,10 @@ def _process_reaction(
# TODO DELETE Reactions
raise NodeProcessed
+ # Set arbitrary limit of max reactions to prevent
+ # performance problems when loading and displaying them
+ reactions = list(properties.reactions.emojis)[:10]
+
timestamp = get_message_timestamp(properties)
muc_data = None
@@ -102,7 +106,7 @@ def _process_reaction(
occupant_=occupant,
id=properties.reactions.id,
direction=direction,
- emojis=';'.join(properties.reactions.emojis),
+ emojis=';'.join(reactions),
timestamp=timestamp,
)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/409e9c8d9df7a23bebb2846d09af13348db3d0e6
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/409e9c8d9df7a23bebb2846d09af13348db3d0e6
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]