Mercurial > prosody-modules
comparison mod_bob/mod_bob.lua @ 3368:76fc915647ab
mod_bob: Don’t try to access XHTML-IM when it isn’t present.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Sun, 04 Nov 2018 18:38:06 +0100 |
| parents | 2e65160187a4 |
| children | 41fbed2de482 |
comparison
equal
deleted
inserted
replaced
| 3367:a83eed629d4b | 3368:76fc915647ab |
|---|---|
| 85 -- Remove and cache all <data/> elements embedded here. | 85 -- Remove and cache all <data/> elements embedded here. |
| 86 stanza:maptags(handle_data_carrier); | 86 stanza:maptags(handle_data_carrier); |
| 87 | 87 |
| 88 -- Find and query all of the cids not already cached. | 88 -- Find and query all of the cids not already cached. |
| 89 local tag = stanza:get_child("html", "http://jabber.org/protocol/xhtml-im"); | 89 local tag = stanza:get_child("html", "http://jabber.org/protocol/xhtml-im"); |
| 90 if not tag then | |
| 91 return; | |
| 92 end | |
| 90 for body in tag:childtags("body", "http://www.w3.org/1999/xhtml") do | 93 for body in tag:childtags("body", "http://www.w3.org/1999/xhtml") do |
| 91 find_images(body, jid, room_jid, log); | 94 find_images(body, jid, room_jid, log); |
| 92 end | 95 end |
| 93 end | 96 end |
| 94 | 97 |
