Fix forward message fromID
This commit is contained in:
parent
69caa741e5
commit
1c6e90efa6
@ -2255,12 +2255,12 @@ export class AppMessagesManager {
|
||||
apiMessage.savedFrom = savedFromPeerID + '_' + savedFromMid;
|
||||
}
|
||||
|
||||
apiMessage.fromID = fwdHeader.channel_id ? -fwdHeader.channel_id : appPeersManager.getPeerID(fwdHeader.from_id);
|
||||
apiMessage.fromID = appPeersManager.getPeerID(deepEqual(apiMessage.from_id, fwdHeader.from_id) ? fwdHeader.from_id : apiMessage.from_id);
|
||||
/* } else {
|
||||
apiMessage.fwdPostID = fwdHeader.channel_post;
|
||||
} */
|
||||
|
||||
apiMessage.fwdFromID = fwdHeader.channel_id ? -fwdHeader.channel_id : appPeersManager.getPeerID(fwdHeader.from_id);
|
||||
apiMessage.fwdFromID = appPeersManager.getPeerID(fwdHeader.from_id);
|
||||
|
||||
fwdHeader.date -= serverTimeManager.serverTimeOffset;
|
||||
}
|
||||
|
@ -750,9 +750,9 @@ namespace RichTextProcessor {
|
||||
|
||||
var tgMeMatch;
|
||||
var telescoPeMatch;
|
||||
if(unsafe == 2) {
|
||||
/* if(unsafe == 2) {
|
||||
url = 'tg://unsafe_url?url=' + encodeURIComponent(url);
|
||||
} else if((tgMeMatch = url.match(/^https?:\/\/t(?:elegram)?\.me\/(.+)/))) {
|
||||
} else */if((tgMeMatch = url.match(/^https?:\/\/t(?:elegram)?\.me\/(.+)/))) {
|
||||
var fullPath = tgMeMatch[1];
|
||||
var path = fullPath.split('/');
|
||||
switch(path[0]) {
|
||||
@ -788,9 +788,9 @@ namespace RichTextProcessor {
|
||||
}
|
||||
} else if((telescoPeMatch = url.match(/^https?:\/\/telesco\.pe\/([^/?]+)\/(\d+)/))) {
|
||||
url = 'tg://resolve?domain=' + telescoPeMatch[1] + '&post=' + telescoPeMatch[2];
|
||||
} else if(unsafe) {
|
||||
//url = 'tg://unsafe_url?url=' + encodeURIComponent(url);
|
||||
}
|
||||
}/* else if(unsafe) {
|
||||
url = 'tg://unsafe_url?url=' + encodeURIComponent(url);
|
||||
} */
|
||||
|
||||
return url;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user