def muc_request_voice(self):
        """
        Request voice (participant role) in the room and wait for the request
        to be sent.

        The participant role allows occupants to send messages while the room
        is in moderated mode.

        There is no guarantee that the request will be granted. To detect that
        voice has been granted, observe the :meth:`on_role_change` signal.

        .. versionadded:: 0.8
        """

        msg = aioxmpp.Message(
            to=self._mucjid,
            type_=aioxmpp.MessageType.NORMAL
        )

        data = aioxmpp.forms.Data(
            aioxmpp.forms.DataType.SUBMIT,
        )

        data.fields.append(
            aioxmpp.forms.Field(
                type_=aioxmpp.forms.FieldType.HIDDEN,
                var="FORM_TYPE",
                values=["http://jabber.org/protocol/muc#request"],
            ),
        )
        data.fields.append(
            aioxmpp.forms.Field(
                type_=aioxmpp.forms.FieldType.LIST_SINGLE,
                var="muc#role",
                values=["participant"],
            )
        )

        msg.xep0004_data.append(data)

        yield from self.service.client.send(msg)
def muc_request_voice ( self ) : msg = aioxmpp . Message ( to = self . _mucjid , type_ = aioxmpp . MessageType . NORMAL ) data = aioxmpp . forms . Data ( aioxmpp . forms . DataType . SUBMIT , ) data . fields . append ( aioxmpp . forms . Field ( type_ = aioxmpp . forms . FieldType . HIDDEN , var = "FORM_TYPE" , values = [ "http://jabber.org/protocol/muc#request" ] , ) , ) data . fields . append ( aioxmpp . forms . Field ( type_ = aioxmpp . forms . FieldType . LIST_SINGLE , var = "muc#role" , values = [ "participant" ] , ) ) msg . xep0004_data . append ( data ) yield from self . service . client . send ( msg )
Request voice (participant role) in the room and wait for the request
        to be sent.

        The participant role allows occupants to send messages while the room
        is in moderated mode.

        There is no guarantee that the request will be granted. To detect that
        voice has been granted, observe the :meth:`on_role_change` signal.

        .. versionadded:: 0.8