mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Merge pull request #1722 from Bilb/fix-trust-closed-group
auto download attachment in closed group
This commit is contained in:
commit
7192b6ea61
1 changed files with 4 additions and 3 deletions
|
@ -1113,13 +1113,14 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
|
|||
}
|
||||
|
||||
public isTrustedForAttachmentDownload() {
|
||||
const convoId = this.getSource();
|
||||
if (!!this.get('isPublic') || isUsFromCache(convoId)) {
|
||||
const senderConvoId = this.getSource();
|
||||
const isClosedGroup = this.getConversation()?.isClosedGroup() || false;
|
||||
if (!!this.get('isPublic') || isClosedGroup || isUsFromCache(senderConvoId)) {
|
||||
return true;
|
||||
}
|
||||
// check the convo from this user
|
||||
// we want the convo of the sender of this message
|
||||
const senderConvo = getConversationController().get(convoId);
|
||||
const senderConvo = getConversationController().get(senderConvoId);
|
||||
if (!senderConvo) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue