diff options
Diffstat (limited to 'libdino/src/service/fallback_body.vala')
-rw-r--r-- | libdino/src/service/fallback_body.vala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libdino/src/service/fallback_body.vala b/libdino/src/service/fallback_body.vala index cc9ba9a6..13323427 100644 --- a/libdino/src/service/fallback_body.vala +++ b/libdino/src/service/fallback_body.vala @@ -64,4 +64,20 @@ public class Dino.FallbackBody : StreamInteractionModule, Object { return false; } } + + public static string get_quoted_fallback_body(ContentItem content_item) { + string fallback = "> "; + + if (content_item.type_ == MessageItem.TYPE) { + Message? quoted_message = ((MessageItem) content_item).message; + fallback += Dino.message_body_without_reply_fallback(quoted_message); + fallback = fallback.replace("\n", "\n> "); + } else if (content_item.type_ == FileItem.TYPE) { + FileTransfer? quoted_file = ((FileItem) content_item).file_transfer; + fallback += quoted_file.file_name; + } + fallback += "\n"; + + return fallback; + } }
\ No newline at end of file |