aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/conversation_titlebar')
-rw-r--r--main/src/ui/conversation_titlebar/view.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/ui/conversation_titlebar/view.vala b/main/src/ui/conversation_titlebar/view.vala
index 13a9bf80..4ca57e1c 100644
--- a/main/src/ui/conversation_titlebar/view.vala
+++ b/main/src/ui/conversation_titlebar/view.vala
@@ -61,7 +61,10 @@ public class ConversationTitlebar : Gtk.HeaderBar {
if (subtitle != null) {
set_subtitle(subtitle);
} else if (conversation.type_ == Conversation.Type.GROUPCHAT) {
- string subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account);
+ string? subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account);
+ if (subject != null) {
+ subject = (new Regex("\\s+")).replace_literal(subject, -1, 0, " ");
+ }
set_subtitle(subject != "" ? subject : null);
} else {
set_subtitle(null);