aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2025-06-13 19:37:27 +0200
committerfiaxh <git@lightrise.org>2025-06-13 19:37:27 +0200
commit2e6454a92e85e87e17ce88924155d825b2b6eca3 (patch)
tree201627b31fd28b02f75fbcb6a46376809e94a379 /libdino/src
parent715b874801201390eb5ffe440acc4af171a9ddaa (diff)
Add support for whole body fallbacks
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/entity/message.vala2
-rw-r--r--libdino/src/util/send_message.vala2
2 files changed, 2 insertions, 2 deletions
diff --git a/libdino/src/entity/message.vala b/libdino/src/entity/message.vala
index e5aad25f..7e15cfe4 100644
--- a/libdino/src/entity/message.vala
+++ b/libdino/src/entity/message.vala
@@ -200,7 +200,7 @@ public class Message : Object {
if (!fallbacks_by_ns.has_key(ns_uri)) {
fallbacks_by_ns[ns_uri] = new ArrayList<Xep.FallbackIndication.FallbackLocation>();
}
- fallbacks_by_ns[ns_uri].add(new Xep.FallbackIndication.FallbackLocation(row[db.body_meta.from_char], row[db.body_meta.to_char]));
+ fallbacks_by_ns[ns_uri].add(new Xep.FallbackIndication.FallbackLocation.partial_body(row[db.body_meta.from_char], row[db.body_meta.to_char]));
break;
case Xep.MessageMarkup.NS_URI:
var types = new ArrayList<Xep.MessageMarkup.SpanType>();
diff --git a/libdino/src/util/send_message.vala b/libdino/src/util/send_message.vala
index 234a1644..8312cf17 100644
--- a/libdino/src/util/send_message.vala
+++ b/libdino/src/util/send_message.vala
@@ -26,7 +26,7 @@ namespace Dino {
out_message.body = fallback + out_message.body;
// Store fallback location
- var fallback_location = new Xep.FallbackIndication.FallbackLocation(0, (int)fallback.char_count());
+ var fallback_location = new Xep.FallbackIndication.FallbackLocation.partial_body(0, (int)fallback.char_count());
var fallback_list = new ArrayList<Xep.FallbackIndication.Fallback>();
fallback_list.add(new Xep.FallbackIndication.Fallback(Xep.Replies.NS_URI, new Xep.FallbackIndication.FallbackLocation[] { fallback_location }));
out_message.set_fallbacks(fallback_list);