Software /
code /
prosody
Comparison
plugins/muc/history.lib.lua @ 11180:ab820b2ad199
MUC: Remove XEP-0091: Legacy Delayed Delivery
Why do we still include this? Deprecated in 2007, obsoleted in 2009.
Removes redundant timestamp that nobody should be looking at since many
years and a redundant copy of the room JID.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Oct 2020 14:19:41 +0200 |
parent | 10775:1641e33f1d36 |
child | 11711:6fbbfa4a1178 |
comparison
equal
deleted
inserted
replaced
11179:96da09c771a1 | 11180:ab820b2ad199 |
---|---|
180 local ts = gettime(); | 180 local ts = gettime(); |
181 local stamp = datetime.datetime(ts); | 181 local stamp = datetime.datetime(ts); |
182 stanza:tag("delay", { -- XEP-0203 | 182 stanza:tag("delay", { -- XEP-0203 |
183 xmlns = "urn:xmpp:delay", from = room.jid, stamp = stamp | 183 xmlns = "urn:xmpp:delay", from = room.jid, stamp = stamp |
184 }):up(); | 184 }):up(); |
185 stanza:tag("x", { -- XEP-0091 (deprecated) | |
186 xmlns = "jabber:x:delay", from = room.jid, stamp = datetime.legacy() | |
187 }):up(); | |
188 local entry = { stanza = stanza, timestamp = ts }; | 185 local entry = { stanza = stanza, timestamp = ts }; |
189 table.insert(history, entry); | 186 table.insert(history, entry); |
190 while #history > get_historylength(room) do table.remove(history, 1) end | 187 while #history > get_historylength(room) do table.remove(history, 1) end |
191 return true; | 188 return true; |
192 end, -1); | 189 end, -1); |