Fix runtime critical
This commit is contained in:
parent
40c66bc584
commit
2f40726f55
|
@ -17,12 +17,13 @@ public class PermissionsProvider : Plugins.ContactDetailsProvider, Object {
|
|||
if (type != Plugins.WidgetType.GTK) return;
|
||||
|
||||
Xmpp.Jid? own_jid = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account);
|
||||
if (stream_interactor.get_module(MucManager.IDENTITY).get_role(own_jid, conversation.account)==Xmpp.Xep.Muc.Role.VISITOR){
|
||||
Button voice_request = new Button() {visible=true, label=_("Request")};
|
||||
voice_request.clicked.connect(()=>stream_interactor.get_module(MucManager.IDENTITY).request_voice(conversation.account, conversation.counterpart));
|
||||
contact_details.add(_("Permissions"), _("Request permission to send messages"), "", voice_request);
|
||||
if (own_jid == null) return;
|
||||
|
||||
}
|
||||
if (stream_interactor.get_module(MucManager.IDENTITY).get_role(own_jid, conversation.account) == Xmpp.Xep.Muc.Role.VISITOR){
|
||||
Button voice_request = new Button() {visible=true, label=_("Request")};
|
||||
voice_request.clicked.connect(()=>stream_interactor.get_module(MucManager.IDENTITY).request_voice(conversation.account, conversation.counterpart));
|
||||
contact_details.add(_("Permissions"), _("Request permission to send messages"), "", voice_request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue