aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/encryption_list_entry.vala
blob: 2e8905e24c7d175d251a45bf28bb43b4f24ed8ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace Dino.Plugins.Omemo {

public class EncryptionListEntry : Plugins.EncryptionListEntry, Object {
    private Plugin plugin;

    public EncryptionListEntry(Plugin plugin) {
        this.plugin = plugin;
    }

    public Entities.Encryption encryption { get {
        return Entities.Encryption.OMEMO;
    }}

    public string name { get {
        return "OMEMO";
    }}

    public bool can_encrypt(Entities.Conversation conversation) {
        return plugin.app.stream_interactor.get_module(Manager.IDENTITY).can_encrypt(conversation);
    }
}

}