Software /
code /
prosody
Annotate
core/features.lua @ 12636:e8934ce6ea0f
util.stanza: Add method for extracting a single attribute value
Sometimes you only care about a single attribute, but the child tag
itself may be optional, leading to needing `tag and tag.attr.foo` or
`stanza:find("tag@foo")`.
The `:find()` method is fairly complex, so avoiding it for this kind of
simpler use case is a win.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 17 Aug 2022 19:04:30 +0200 |
parent | 12252:4bfe658415a0 |
child | 12655:a5a0783e9241 |
child | 13110:d5f322dd424b |
rev | line source |
---|---|
12252
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 local set = require "util.set"; |
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 |
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 return { |
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 available = set.new{ |
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 -- mod_bookmarks bundled |
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 "mod_bookmarks"; |
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 }; |
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 }; |