aboutsummaryrefslogtreecommitdiff
path: root/lib/chotto/message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chotto/message.rb')
-rw-r--r--lib/chotto/message.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/chotto/message.rb b/lib/chotto/message.rb
index cc3a134..82d77a4 100644
--- a/lib/chotto/message.rb
+++ b/lib/chotto/message.rb
@@ -3,18 +3,25 @@
module Chotto
class Message
attr_reader :message, :messages, :db
- attr_accessor :tags
+
+ # attr_accessor :tags
def initialize(msg:, db:)
@message = msg
@db = db
- @tags = @message.tags
+ # @tags = MessageTags.new(message: message)
end
def method_missing(method_name, *_args)
handle_get_header(Chotto::Helpers.header_name_from_dsl(method_name))
end
+ def tags
+ @tags ||= message.tags
+ end
+
+ attr_writer :tags
+
def save!
message.remove_all_tags
tags.each do |tag|