mirror of
https://github.com/discourse/discourse.git
synced 2024-12-27 22:44:57 +08:00
22 lines
321 B
Ruby
22 lines
321 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Chat
|
||
|
class NullMessage < Chat::Message
|
||
|
def user
|
||
|
nil
|
||
|
end
|
||
|
|
||
|
def excerpt(max_length: nil)
|
||
|
nil
|
||
|
end
|
||
|
|
||
|
def id
|
||
|
nil
|
||
|
end
|
||
|
|
||
|
def created_at
|
||
|
Time.now # a proper NullTime object would be better, but this is good enough for now
|
||
|
end
|
||
|
end
|
||
|
end
|