aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/message_processor.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2023-05-01 19:15:36 +0200
committerfiaxh <git@lightrise.org>2023-05-01 19:21:05 +0200
commit0bddf9f3dacc0945429979787348f41571f27518 (patch)
tree3259f07b59f081fac31fe62df3bfa7e13e78dd4c /libdino/src/service/message_processor.vala
parentec6c24c2b41fc9de704323ce895b2dc81549ca5e (diff)
downloaddino-0bddf9f3dacc0945429979787348f41571f27518.tar.gz
dino-0bddf9f3dacc0945429979787348f41571f27518.zip
Fix character counting for fallbacks
fixes #1420
Diffstat (limited to 'libdino/src/service/message_processor.vala')
-rw-r--r--libdino/src/service/message_processor.vala3
1 files changed, 1 insertions, 2 deletions
diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala
index 04c7d1a5..01687083 100644
--- a/libdino/src/service/message_processor.vala
+++ b/libdino/src/service/message_processor.vala
@@ -472,8 +472,7 @@ public class MessageProcessor : StreamInteractionModule, Object {
string fallback = FallbackBody.get_quoted_fallback_body(content_item);
- long fallback_length = fallback.length;
- var fallback_location = new Xep.FallbackIndication.FallbackLocation(0, (int)fallback_length);
+ var fallback_location = new Xep.FallbackIndication.FallbackLocation(0, (int)fallback.char_count());
Xep.FallbackIndication.set_fallback(new_stanza, new Xep.FallbackIndication.Fallback(Xep.Replies.NS_URI, new Xep.FallbackIndication.FallbackLocation[] { fallback_location }));
return fallback;