Chat replies missing excerpt

In my case of only ~1000 chat messages, it was simple to just update them all to add the excerpt:

Chat::Message.where(excerpt: nil).each{|m| m.update(excerpt: m.build_excerpt) };0

But a code fix would be to add a fallback to plugins/chat/app/serializers/chat/in_reply_to_serializer.rb

def excerpt
  object.excerpt || object.build_excerpt
end
1 Like