Browse Source

follow-up

master
Eduard Kuzmenko 3 years ago
parent
commit
03ecbf5c36
  1. 4
      src/helpers/windowSize.ts
  2. 4
      src/lib/appManagers/appMessagesManager.ts
  3. 3
      src/lib/appManagers/appPhotosManager.ts
  4. 2
      src/lib/mtproto/mtproto_config.ts

4
src/helpers/windowSize.ts

@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
*/
export class WindowSize {
public width = 0;
public height = 0;
public width: number;
public height: number;
constructor() {
// @ts-ignore

4
src/lib/appManagers/appMessagesManager.ts

@ -48,7 +48,7 @@ import appNotificationsManager, { NotifyOptions } from "./appNotificationsManage @@ -48,7 +48,7 @@ import appNotificationsManager, { NotifyOptions } from "./appNotificationsManage
import PeerTitle from "../../components/peerTitle";
import htmlToDocumentFragment from "../../helpers/dom/htmlToDocumentFragment";
import htmlToSpan from "../../helpers/dom/htmlToSpan";
import { MUTE_UNTIL, NULL_PEER_ID, REPLIES_HIDDEN_PEER_ID, REPLIES_PEER_ID, SERVICE_PEER_ID } from "../mtproto/mtproto_config";
import { MUTE_UNTIL, NULL_PEER_ID, REPLIES_HIDDEN_CHANNEL_ID, REPLIES_PEER_ID, SERVICE_PEER_ID } from "../mtproto/mtproto_config";
import formatCallDuration from "../../helpers/formatCallDuration";
import appAvatarsManager from "./appAvatarsManager";
import telegramMeWebManager from "../mtproto/telegramMeWebManager";
@ -5756,7 +5756,7 @@ export class AppMessagesManager { @@ -5756,7 +5756,7 @@ export class AppMessagesManager {
public getMessageWithReplies(message: Message.message) {
if(message.peerId !== REPLIES_PEER_ID) {
message = this.filterMessages(message, message => !!(message as Message.message).replies)[0] as any;
if(!(message && message.replies && message.replies.pFlags.comments && message.replies.channel_id.toPeerId() !== REPLIES_HIDDEN_PEER_ID)) {
if(!(message && message.replies && message.replies.pFlags.comments && message.replies.channel_id.toChatId() !== REPLIES_HIDDEN_CHANNEL_ID)) {
return;
}
}

3
src/lib/appManagers/appPhotosManager.ts

@ -29,6 +29,7 @@ import bytesFromHex from "../../helpers/bytes/bytesFromHex"; @@ -29,6 +29,7 @@ import bytesFromHex from "../../helpers/bytes/bytesFromHex";
import isObject from "../../helpers/object/isObject";
import safeReplaceArrayInObject from "../../helpers/object/safeReplaceArrayInObject";
import bytesToDataURL from "../../helpers/bytes/bytesToDataURL";
import { REPLIES_HIDDEN_CHANNEL_ID } from "../mtproto/mtproto_config";
export type MyPhoto = Photo.photo;
@ -263,7 +264,7 @@ export class AppPhotosManager { @@ -263,7 +264,7 @@ export class AppPhotosManager {
(message.message ||
message.reply_to_mid ||
message.media.webpage ||
(message.replies && message.replies.pFlags.comments && message.replies.channel_id !== 777)
(message.replies && message.replies.pFlags.comments && message.replies.channel_id.toChatId() !== REPLIES_HIDDEN_CHANNEL_ID)
)
) { // make sure that bubble block is human-readable
if(boxSize.width < 320) {

2
src/lib/mtproto/mtproto_config.ts

@ -12,7 +12,7 @@ export type UserAuth = {dcID: number | string, date: number, id: PeerId}; @@ -12,7 +12,7 @@ export type UserAuth = {dcID: number | string, date: number, id: PeerId};
export const NULL_PEER_ID: PeerId = 0;
export const REPLIES_PEER_ID: PeerId = 1271266957;
export const REPLIES_HIDDEN_PEER_ID: PeerId = 777;
export const REPLIES_HIDDEN_CHANNEL_ID: ChatId = 777;
export const SERVICE_PEER_ID: PeerId = 777000;
export const MUTE_UNTIL = 0x7FFFFFFF;
export const BOT_START_PARAM = '';

Loading…
Cancel
Save