Telegram Web K with changes to work inside I2P
https://web.telegram.i2p/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
760 B
25 lines
760 B
/* |
|
* https://github.com/morethanwords/tweb |
|
* Copyright (C) 2019-2021 Eduard Kuzmenko |
|
* https://github.com/morethanwords/tweb/blob/master/LICENSE |
|
*/ |
|
|
|
import type { Message, MessageAction } from "../layer"; |
|
import type { MyMessage } from "../lib/appManagers/appMessagesManager"; |
|
import forEachReverse from "./array/forEachReverse"; |
|
|
|
export default function filterChatPhotosMessages(value: { |
|
count: number; |
|
next_rate: number; |
|
offset_id_offset: number; |
|
history: MyMessage[]; |
|
}) { |
|
forEachReverse(value.history, (message, idx, arr) => { |
|
if(!((message as Message.messageService).action as MessageAction.messageActionChatEditPhoto).photo) { |
|
arr.splice(idx, 1); |
|
if(value.count !== undefined) { |
|
--value.count; |
|
} |
|
} |
|
}); |
|
}
|
|
|