Skip to content
Snippets Groups Projects
Commit 8d81b90b authored by Sébastien Blin's avatar Sébastien Blin
Browse files

interaction: do not rewrite author for outgoing interaction

Change-Id: I92d50aa0342a6d89e003cedabf1227fec029baeb
parent 482c334f
Branches
Tags
No related merge requests found
...@@ -67,7 +67,7 @@ Loader { ...@@ -67,7 +67,7 @@ Loader {
2 * hPadding - avatarBlockWidth 2 * hPadding - avatarBlockWidth
- buttonsLoader.width - 24 - 6 - 24 - buttonsLoader.width - 24 - 6 - 24
isOutgoing: Author === "" isOutgoing: Author === CurrentAccount.uri
showTime: root.showTime showTime: root.showTime
seq: root.seq seq: root.seq
author: Author author: Author
......
...@@ -231,6 +231,7 @@ Control { ...@@ -231,6 +231,7 @@ Control {
} else { } else {
y = 0 y = 0
} }
var distBorders = root.width - bubble.width - width var distBorders = root.width - bubble.width - width
if (isOutgoing) { if (isOutgoing) {
if (distBorders > 0) if (distBorders > 0)
...@@ -246,6 +247,7 @@ Control { ...@@ -246,6 +247,7 @@ Control {
} }
} }
MessageBubble { MessageBubble {
id: bubble id: bubble
...@@ -359,7 +361,7 @@ Control { ...@@ -359,7 +361,7 @@ Control {
EmojiReactions { EmojiReactions {
id: emojiReaction id: emojiReaction
property bool isOutgoing: Author === "" property bool isOutgoing: Author === CurrentAccount.uri
Layout.alignment: isOutgoing ? Qt.AlignRight : Qt.AlignLeft Layout.alignment: isOutgoing ? Qt.AlignRight : Qt.AlignLeft
Layout.rightMargin: isOutgoing ? status.width : undefined Layout.rightMargin: isOutgoing ? status.width : undefined
Layout.leftMargin: !isOutgoing ? avatarBlock.width : undefined Layout.leftMargin: !isOutgoing ? avatarBlock.width : undefined
...@@ -411,5 +413,6 @@ Control { ...@@ -411,5 +413,6 @@ Control {
id: reactionPopup id: reactionPopup
emojiReaction: Reactions emojiReaction: Reactions
} }
} }
...@@ -37,7 +37,7 @@ SBSMessageBase { ...@@ -37,7 +37,7 @@ SBSMessageBase {
JamiTheme.chatviewLinkColorLight : JamiTheme.chatviewLinkColorLight :
JamiTheme.chatviewLinkColorDark JamiTheme.chatviewLinkColorDark
isOutgoing: Author === "" isOutgoing: Author === CurrentAccount.uri
author: Author author: Author
readers: Readers readers: Readers
timestamp: Timestamp timestamp: Timestamp
......
...@@ -325,14 +325,12 @@ struct Info ...@@ -325,14 +325,12 @@ struct Info
if (message.contains("react-to") && type == Type::TEXT) { if (message.contains("react-to") && type == Type::TEXT) {
type = to_type("REACTION"); type = to_type("REACTION");
react_to = message["react-to"]; react_to = message["react-to"];
authorUri = message["author"];
} }
authorUri = message["author"];
if (type == Type::TEXT || type == Type::EDITED || type == Type::REACTION) { if (type == Type::TEXT || type == Type::EDITED || type == Type::REACTION) {
body = message["body"]; body = message["body"];
} }
if (type != Type::REACTION)
authorUri = accountURI == message["author"] ? "" : message["author"];
timestamp = message["timestamp"].toInt(); timestamp = message["timestamp"].toInt();
status = Status::SUCCESS; status = Status::SUCCESS;
parentId = message["linearizedParent"]; parentId = message["linearizedParent"];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment