Skip to content

Commit 786a1dc

Browse files
committed
minor
1 parent 1c4e6c5 commit 786a1dc

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

services/static-webserver/client/source/class/osparc/data/model/Conversation.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,12 @@ qx.Class.define("osparc.data.model.Conversation", {
133133
messages.push(message);
134134
this.setMessages(messages);
135135
},
136+
137+
getContextProjectId: function() {
138+
if (this.getExtraContext() && "projectId" in this.getExtraContext()) {
139+
return this.getExtraContext()["projectId"];
140+
}
141+
return null;
142+
}
136143
},
137144
});

services/static-webserver/client/source/class/osparc/support/ConversationPage.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ qx.Class.define("osparc.support.ConversationPage", {
139139
if (amISupporter && extraContext && Object.keys(extraContext).length) {
140140
let extraContextText = "";
141141
extraContextText += `ID: ${conversationId}<br>`;
142-
if ("projectId" in extraContext) {
143-
extraContextText += `Project ID: ${extraContext["projectId"]}<br>`;
142+
const contextProjectId = conversation.getContextProjectId();
143+
if (contextProjectId) {
144+
extraContextText += `Project ID: ${contextProjectId}<br>`;
144145
}
145146
extraContextLabel.setValue(extraContextText);
146147
}

0 commit comments

Comments
 (0)