This commit is contained in:
Daniel Schubert 2019-07-08 18:15:49 +02:00
parent 21dc2d6d5b
commit b79a145e62

View File

@ -73,12 +73,12 @@ class ImportDMS
@dms.fetch(key).each do |u_id| @dms.fetch(key).each do |u_id|
user_names.push( @users.fetch(u_id) ) user_names.push( @users.fetch(u_id) )
end end
self.create_channel_list self.create_channel_list(user_names)
self.create_direct_messages self.create_direct_messages(key, user_names)
end end
end end
def create_direct_messages def create_direct_messages(key, user_names)
#TODO : replies are output as normal messages; should be grouped as replies #TODO : replies are output as normal messages; should be grouped as replies
# create direct messages list # create direct messages list
m = get_messages(key) m = get_messages(key)
@ -88,7 +88,7 @@ class ImportDMS
end end
end end
def create_channel_list def create_channel_list( user_names )
cl = {"type" => "direct_channel", "direct_channel" => {"members" => user_names, "favorited_by" => nil,"header" => "" }}.to_json cl = {"type" => "direct_channel", "direct_channel" => {"members" => user_names, "favorited_by" => nil,"header" => "" }}.to_json
puts cl puts cl
end end