Mercurial > prosody-modules
comparison mod_http_muc_log/mod_http_muc_log.lua @ 4987:8a8ec909ac20
mod_http_muc_log: Link to replied-to message using XEP-0461: Message Replies
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 12 Aug 2022 17:15:11 +0200 |
parents | 3bcefa9cf1ca |
children | b74d592df9e2 |
comparison
equal
deleted
inserted
replaced
4986:3bcefa9cf1ca | 4987:8a8ec909ac20 |
---|---|
386 break | 386 break |
387 end | 387 end |
388 end | 388 end |
389 end | 389 end |
390 | 390 |
391 -- XEP-0461: Message Replies | |
392 local reply = item:get_child("reply", "urn:xmpp:reply:0"); | |
393 | |
391 if body or verb or oob then | 394 if body or verb or oob then |
392 local line = { | 395 local line = { |
393 id = item.attr.id, | 396 id = item.attr.id, |
394 key = key; | 397 key = key; |
395 datetime = datetime.datetime(when); | 398 datetime = datetime.datetime(when); |
399 lang = lang; | 402 lang = lang; |
400 nick = nick; | 403 nick = nick; |
401 st_name = item.name; | 404 st_name = item.name; |
402 st_type = item.attr.type; | 405 st_type = item.attr.type; |
403 edit = edit; | 406 edit = edit; |
407 reply = reply and reply.attr.id; | |
404 }; | 408 }; |
405 if oob then | 409 if oob then |
406 line.oob = { | 410 line.oob = { |
407 url = oob:get_child_text("url"); | 411 url = oob:get_child_text("url"); |
408 desc = oob:get_child_text("desc"); | 412 desc = oob:get_child_text("desc"); |