Blank Avatars in chat list for Secret Chats

Bug #1517626 reported by Randall Ross
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Telegram app
Confirmed
High
Unassigned

Bug Description

Action Taken:
Launch Telegram and obtain list of active chats

Observed Result:
Secret Chats have a blank avatar.
- see attached screenshot

Expected Result:
Secret Chats should display correct avatar for contact, either their own or a generic one based on contact initials.

Environment information
Telegram for Ubuntu (Beta) v 2.0.4.0
Ubuntu 15.04 (r293)
Nexus 7 (2013) flo
rc-proposed channel

Related branches

Revision history for this message
Randall Ross (randall) wrote :
Michał Karnicki (karni)
tags: added: v2
Michał Karnicki (karni)
Changed in telegram-app:
status: New → Confirmed
importance: Undecided → High
milestone: none → m26
Jin (jindallo)
Changed in telegram-app:
assignee: nobody → Jin (jin.cth)
status: Confirmed → In Progress
Revision history for this message
Jin (jindallo) wrote :

Can not reproduce this issue by 100%,
need to trace source code to find the root cause.

Revision history for this message
Randall Ross (randall) wrote :

I had this problem with the version switch from v1 to v2. At some point the avatars for secret chats appeared again, but only for new chats. I suspect that there was/is a problem with chats initiated in the past and those chats not migrating properly to the new version.

Revision history for this message
Jin (jindallo) wrote :

Root cause found,
if we refresh the dialog lists when the secret session is "waiting" for the response from opposite site,
this issue occurred.

The fix will be in the 3rd library,
need to discuss how to deliver the solution at the moment.

Michał Karnicki (karni)
Changed in telegram-app:
milestone: m26 → m27
Jin (jindallo)
Changed in telegram-app:
status: In Progress → Triaged
milestone: m27 → m28
Jin (jindallo)
Changed in telegram-app:
assignee: Jin (jin.cth) → nobody
Jin (jindallo)
Changed in telegram-app:
milestone: m28 → m29
Jin (jindallo)
Changed in telegram-app:
milestone: m29 → m30
Jin (jindallo)
Changed in telegram-app:
milestone: m30 → m31
Jin (jindallo)
Changed in telegram-app:
milestone: m31 → none
Jin (jindallo)
Changed in telegram-app:
milestone: none → m31
Jin (jindallo)
Changed in telegram-app:
status: Triaged → Confirmed
Revision history for this message
Jin (jindallo) wrote :

I confirm the symptom by below steps:
    a. Init. a secret chat
    b.1. Select the contact who is not shown for a long time
    (e.g. last seen a long time ago)
    b.2. Select the Telegram official account
    (which is "online" often)
    c. Switch the app. to background
    d. Switch app. back to the foreground
    e. Observe the secret chat
you can try the step:b1 or step:b2 to reproduce this issue.

Changed in telegram-app:
assignee: nobody → Ash (ashley-richards)
Revision history for this message
Jin (jindallo) wrote :

Pass criteria is the same as the "Expected Results",
    1. Need to show the avatar/initial of the account
    (no matter the account is online or offline)
    2. No need to remove the uncompleted secret chat

Revision history for this message
Paz Chauhan (paz-chauhan) wrote :

The fix to manually add adminID and participantID in the library solved the issue. However, this solution had a side effect in that after app re-launch the user was able to tap the offline chat from the list and attempt to send a message (which of course is never received). A solution has been found for this side effect

Revision history for this message
Ash (ashley-richards) wrote :

After QAing Paz's fix I found some things:

#1 After relaunch from creating a new secret chat with other user offline. Go into the chat, send a message, sent message is in 'pending' state, go back to chat list, other user comes online, go back into same chat then send a message:
> iOS - Nothing sends (not related to this bug. Sending secret chat to iOS from Ubuntu doesn't work already exists in main trunk)
> Android - Send message but if you send another message after the Android stops receiving messages form Ubuntu.

Found with Paz's code however I can't confirm if bug already exists from main trunk as secret chat conversation stops working after relaunch.

==

#2 After relaunch, back online and users are talking the 'last message' doesn't update and is still saying "<user> is currently offline". After a restart the 'last message' shows the last message sent in chat and when other user sends a message. However if I send a message to the chat the 'last message' goes back to "<user> is currently offline".

Found with and without Paz's code. #2 already exists in main trunk.

Would you like me to create new bug report for these that are already in the main trunk @jin?

Revision history for this message
Paz Chauhan (paz-chauhan) wrote :

Library code changes are as follows:

In telegram.cpp (found in deps/libqtelegram-ae) method messagesCreateEncryptedChat, to the following:

qint64 Telegram::messagesCreateEncryptedChat(const InputUser &user) {

    qCDebug(TG_LIB_SECRET) << "creating new encrypted chat";
    // generate a new object where store all the needed secret chat data
    SecretChat *secretChat = new SecretChat(prv->mSettings);
    secretChat->setAdminId(prv->mSettings->ourId());
    secretChat->setParticipantId(user.userId());
    secretChat->setRequestedUser(user);
    return generateGAorB(secretChat);
}

Jin (jindallo)
Changed in telegram-app:
status: Confirmed → In Progress
Jin (jindallo)
Changed in telegram-app:
milestone: m31 → m32
Jin (jindallo)
Changed in telegram-app:
assignee: Ash (ashley-richards) → Paz Chauhan (paz-chauhan)
Revision history for this message
Jin (jindallo) wrote :

Paz already filed the merge proposal for this issue,
but we get blocker on the changes must be in the upstream side,
Jin will do the next to get them merged.

Changed in telegram-app:
assignee: Paz Chauhan (paz-chauhan) → Jin (jin.cth)
Jin (jindallo)
Changed in telegram-app:
milestone: m32 → none
Jin (jindallo)
tags: added: dependencies-upgrade-required
removed: v2
Changed in telegram-app:
assignee: Jin (jin.cth) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.