aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/ui/contact_details_provider.vala
blob: 7c733cd7bff43cd813d9455a344bfab3df4a6dc6 (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
24
25
26
27
28
29
using Gtk;
using Gee;
using Qlite;
using Dino.Entities;

namespace Dino.Plugins.Omemo {

public class ContactDetailsProvider : Plugins.ContactDetailsProvider, Object {
    public string id { get { return "omemo_info"; } }
    public string tab { get { return "encryption"; } }

    private Plugin plugin;

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

    public void populate(Conversation conversation, Plugins.ContactDetails contact_details, WidgetType type) { }

    public Object? get_widget(Conversation conversation) {
        if (conversation.type_ != Conversation.Type.CHAT) return null;

        var widget  = new OmemoPreferencesWidget(plugin);
        widget.set_jid(conversation.account, conversation.counterpart);
        return widget;
    }
}

}