Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening a profile automatically mutes the chat #3780

Closed
RememberTheAir opened this issue Aug 9, 2017 · 17 comments
Closed

Opening a profile automatically mutes the chat #3780

RememberTheAir opened this issue Aug 9, 2017 · 17 comments

Comments

@RememberTheAir
Copy link

RememberTheAir commented Aug 9, 2017

Steps to reproduce

  1. search for an username or open an user profile/channel/bot from an username in a message

Expected behaviour

The channel/user/bot's notifications are not muted as soon as you open the profile (if I recall correctly, channels are muted as soon as you subscribe them)

Actual behaviour

The notifications checkbox is unchecked (and thus notifications are muted) as soon as you open the profile. If you are fast enough, you can see the checkbox being untoggled in front of your eyes.

Here's a link to a video where I open some random profiles I've never opened before, their notifications checkboxes get automatically unchecked (note that I'm not clicking on the checkboxes, it was my fault to hover on them with the mouse while recording the video): link

Configuration

Operating system: Windows 7 and Windows 10 Pro 10.0.15063

Version of Telegram Desktop: 1.1.19 alpha portable

Used theme: default

@RememberTheAir
Copy link
Author

RememberTheAir commented Aug 9, 2017

Another video: me looking for random bots. Bots get automatically muted as soon as I open their profile. With the second one, if you pay enough attention, you can see the notifications checkbox being automatically unchecked right after I open its profile

@stek29
Copy link
Contributor

stek29 commented Aug 10, 2017

I tried but was unable to reproduce it.
Usually it happens when peer is unmuted on server side but tdesktop doesn't know about it -- and when it requests "UserFull" it notices that it's muted and I uncheckes that checkbox.

The only reason bots can be authomatically unmuted that I can think of is muting all users, but tdesktop handles it correctly, without reloading.

Could you enable debug logs, search for random bots and then open mtp_HH_MM.txt log and look for notify_settings of those bots?

@RememberTheAir
Copy link
Author

RememberTheAir commented Aug 10, 2017

@stek29 I searched for the following bots and users (...I've never seen before):
@sssbot
@fffbot
@hhhbot
@riccar
@andrea

The username links to the result of what I suppose was the result of UserFull. The notification flags appear to always be 0

@stek29
Copy link
Contributor

stek29 commented Aug 10, 2017

mute_until is more interesting than flags :)

@stek29
Copy link
Contributor

stek29 commented Aug 10, 2017

Also, are those users muted on other apps? You can try https://web.telegram.org.

@RememberTheAir
Copy link
Author

@stek29 yes, they result muted in other apps (screenshots -> @riccar, @fffbot)

@RememberTheAir
Copy link
Author

RememberTheAir commented Aug 10, 2017

Interesting: just noticed that this is actually happening also from the latest Android beta 4.2.2 (10595). So I guess this is an API issue?

When I search for random usernames (users/bots), and I open their profile, notifications are turned off

I wonder if I'm the only one having this issue

@john-preston
Copy link
Member

@RememberTheAir I'm afraid tdesktop is not muting anything on profile open indeed — it just loads the status of notifications and shows it in the profile. The question is why everyone is muted for you on the server side.

@RememberTheAir
Copy link
Author

@john-preston yes, not a tdesktop problem. Feel free to close this issue. I will report this to the in-app support

@john-preston
Copy link
Member

@RememberTheAir There are some global notifications settings, perhaps you turned them off? For all users/ all chats?

@RememberTheAir
Copy link
Author

RememberTheAir commented Aug 10, 2017

@john-preston there are? From where do I do that?

@stek29
Copy link
Contributor

stek29 commented Aug 10, 2017

@RememberTheAir Yes.
You can check them via tjhorer.com/webogram.
Log in, click on "Telegram for Devs", click on Sandbox.

Method is account.getNotifySettings
Payload is {"peer":{"_":"inputNotifyUsers"}}

@RememberTheAir
Copy link
Author

RememberTheAir commented Aug 10, 2017

@stek29 thanks.

respose from the API

I honestly don't understand what this means... are these my default "global" notifications settings? If yes, how do I change them? I'm looking at the latest layer but I can't find a function that could help me

@stek29
Copy link
Contributor

stek29 commented Aug 10, 2017

Yes, those are your default notification settings for users (=bots)
You have them muted until 2038 (forever XD)

Here's how to unmute them:
account.updateNotifySettings
{"peer":{"_":"inputNotifyUsers"}, "settings": {"_":"inputPeerNotifySettings", "mute_until":0, "flags": 1 }}

Setting mute_until to 0 disables mute, setting flags to 1 enables show_previews.
You may also want to add "sound": "9.m4a" to set notification sound on apps different from TDesktop. Mine is 9, others should be fine too, maybe even having it empty is ok.

@stek29
Copy link
Contributor

stek29 commented Aug 10, 2017

Oh, and about the latest layer.
Official site is awfully outdated. Use tl file in this repo, or https://stek29.rocks/tl-schema

@RememberTheAir
Copy link
Author

@stek29 thanks a lot for the help! It worked :)

@github-actions
Copy link

github-actions bot commented Mar 8, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants