function Message:_setOldContent(d)
local ts = d.edited_timestamp
if not ts then return end
local old = self._old
if old then
old[ts] = old[ts] or self._content
else
self._old = {[ts] = self._content}
end
end
self._old is only ever changed through _setOldContent, and according to the code of that, oldContent can never be a string. Rather it is always either a table or nil (in case message was not edited, or no cache).
self._old
is only ever changed through_setOldContent
, and according to the code of that,oldContent
can never be a string. Rather it is always either a table or nil (in case message was not edited, or no cache).