Harden the system slightly against bad message files

This commit is contained in:
Eric Budd 2018-05-11 16:06:34 -04:00
parent af59ad2cb3
commit 5c1d3724bc
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
* Message deletion
* ~Message editing~
* Allow shelling out to editor for message editing?
* Gracefully handle bad message files
* ~Gracefully handle bad message files~
* ~Fix topic selection when replying without topic ID~
* ~Automatically display topics when opening~
* Add column headers for topics

View File

@ -361,7 +361,7 @@ class Message
end
def latest_topic_timestamp
(replies.map(&:timestamp).max || timestamp).gsub(/T/, ' ').gsub(/Z/, '')
(replies.map(&:timestamp).max || timestamp || 'UNKNOWN').gsub(/T/, ' ').gsub(/Z/, '')
end
def to_topic_line(index)