Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9db6377526
|
||
|
|
b8be51799c
|
@@ -254,9 +254,10 @@ func (app *wkdApp) replaceLink(src, link string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getWKDDomain(ctx context.Context, domain string) (string, bool) {
|
func getWKDDomain(ctx context.Context, domain string) (string, bool) {
|
||||||
cname, err := net.DefaultResolver.LookupCNAME(ctx, "openpgpkey."+domain)
|
adv := "openpgpkey." + domain
|
||||||
|
_, err := net.DefaultResolver.LookupCNAME(ctx, adv)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return strings.Trim(cname, "."), true
|
return adv, true
|
||||||
}
|
}
|
||||||
return domain, false
|
return domain, false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,10 +76,6 @@ func NewXMPP(ctx context.Context, config *xmpp.Config) (*connection, error) {
|
|||||||
func (conn *connection) GetXMPPVCard(ctx context.Context, jid string) (vc *VCard, err error) {
|
func (conn *connection) GetXMPPVCard(ctx context.Context, jid string) (vc *VCard, err error) {
|
||||||
log := log.Ctx(ctx)
|
log := log.Ctx(ctx)
|
||||||
|
|
||||||
if err := conn.client.Resume(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var iq *stanza.IQ
|
var iq *stanza.IQ
|
||||||
iq, err = stanza.NewIQ(stanza.Attrs{To: jid, Type: "get"})
|
iq, err = stanza.NewIQ(stanza.Attrs{To: jid, Type: "get"})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user