diff --git a/slixmpp/plugins/xep_0461/stanza.py b/slixmpp/plugins/xep_0461/stanza.py index b4a36b60..e6297f75 100644 --- a/slixmpp/plugins/xep_0461/stanza.py +++ b/slixmpp/plugins/xep_0461/stanza.py @@ -24,7 +24,7 @@ class FeatureFallBack(ElementBase): end = self["fallback_body"]["end"] body = self.parent()["body"] if start <= end: - return body[start:end+1] + return body[start:end] else: return "" @@ -44,7 +44,7 @@ class FeatureFallBack(ElementBase): msg["body"] = quoted + msg["body"] msg["feature_fallback"]["for"] = NS msg["feature_fallback"]["fallback_body"]["start"] = 0 - msg["feature_fallback"]["fallback_body"]["end"] = len(quoted) - 1 + msg["feature_fallback"]["fallback_body"]["end"] = len(quoted) class FallBackBody(ElementBase): diff --git a/tests/test_stanza_xep_0461.py b/tests/test_stanza_xep_0461.py index 202e2083..12c92bd4 100644 --- a/tests/test_stanza_xep_0461.py +++ b/tests/test_stanza_xep_0461.py @@ -54,8 +54,8 @@ class TestReply(SlixTest): """ > Anna wrote:\n> Hi, how are you?\nGreat - - + + """