this commit was sponsored by mizkif

This commit is contained in:
2026-07-14 16:25:18 +01:00
parent 7c19abb6ae
commit ede81d551c
6 changed files with 84 additions and 11 deletions
+25
View File
@@ -3,6 +3,7 @@ package main
import (
"gosrc.io/xmpp"
"gosrc.io/xmpp/stanza"
"fmt"
)
// This file has small functions that can be used to do XMPP stuff without writing tons of boilerplate
@@ -116,3 +117,27 @@ func JidMustParse(s string) *stanza.Jid {
}
return j
}
func sendVoiceRequest(c xmpp.Sender, sendTo string) error {
err := c.SendRaw(fmt.Sprintf(`
<message from='%s'
id='yd53c486'
to='%s'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE'>
<value>http://jabber.org/protocol/muc#request</value>
</field>
<field var='muc#role'
type='list-single'
label='Requested role'>
<value>participant</value>
</field>
</x>
</message>
`, clientroot.Session.BindJid, sendTo))
if err != nil {
return err
}
return nil
}