Skip to content

Commit 926adcf

Browse files
committed
MOBILE-2919 message: Fix auto-open discussion by userid
1 parent f94b1a3 commit 926adcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/addon/messages/pages/group-conversations/group-conversations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export class AddonMessagesGroupConversationsPage implements OnInit, OnDestroy {
222222
}
223223

224224
this.fetchData().then(() => {
225-
if (!this.conversationId && this.splitviewCtrl.isOn()) {
225+
if (!this.conversationId && !this.discussionUserId && this.splitviewCtrl.isOn()) {
226226
// Load the first conversation.
227227
let conversation;
228228
const expandedOption = this.getExpandedOption();
@@ -256,7 +256,7 @@ export class AddonMessagesGroupConversationsPage implements OnInit, OnDestroy {
256256
return Promise.all(promises).then(() => {
257257
if (typeof this.favourites.expanded == 'undefined') {
258258
// The expanded status hasn't been initialized. Do it now.
259-
if (this.conversationId) {
259+
if (this.conversationId || this.discussionUserId) {
260260
// A certain conversation should be opened.
261261
// We don't know which option it belongs to, so we need to fetch the data for all of them.
262262
const promises = [];
@@ -267,7 +267,7 @@ export class AddonMessagesGroupConversationsPage implements OnInit, OnDestroy {
267267

268268
return Promise.all(promises).then(() => {
269269
// All conversations have been loaded, find the one we need to load and expand its option.
270-
const conversation = this.findConversation(this.conversationId);
270+
const conversation = this.findConversation(this.conversationId, this.discussionUserId);
271271
if (conversation) {
272272
const option = this.getConversationOption(conversation);
273273

0 commit comments

Comments
 (0)