diff --git a/app/models/super_admin.rb b/app/models/super_admin.rb index 29629f632..f41610ee4 100644 --- a/app/models/super_admin.rb +++ b/app/models/super_admin.rb @@ -13,10 +13,8 @@ # display_name :string # email :string # encrypted_password :string default(""), not null -# failed_attempts :integer # last_sign_in_at :datetime # last_sign_in_ip :string -# locked_at :datetime # message_signature :text # name :string not null # provider :string default("email"), not null @@ -30,7 +28,6 @@ # ui_settings :jsonb # uid :string default(""), not null # unconfirmed_email :string -# unlock_token :string # created_at :datetime not null # updated_at :datetime not null # diff --git a/app/models/user.rb b/app/models/user.rb index 1a78d082d..3094990d5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -13,10 +13,8 @@ # display_name :string # email :string # encrypted_password :string default(""), not null -# failed_attempts :integer # last_sign_in_at :datetime # last_sign_in_ip :string -# locked_at :datetime # message_signature :text # name :string not null # provider :string default("email"), not null @@ -30,7 +28,6 @@ # ui_settings :jsonb # uid :string default(""), not null # unconfirmed_email :string -# unlock_token :string # created_at :datetime not null # updated_at :datetime not null # diff --git a/app/views/api/v1/models/_message.json.jbuilder b/app/views/api/v1/models/_message.json.jbuilder index 1b615a93c..7c8d1ca1a 100644 --- a/app/views/api/v1/models/_message.json.jbuilder +++ b/app/views/api/v1/models/_message.json.jbuilder @@ -2,6 +2,7 @@ json.id message.id json.content message.content json.inbox_id message.inbox_id json.echo_id message.echo_id if message.echo_id +# For deleted conversation, messages are not yet deleted [because of destroy_async] for this we added try block json.conversation_id message.conversation.try(:display_id) json.message_type message.message_type_before_type_cast json.content_type message.content_type diff --git a/db/schema.rb b/db/schema.rb index b3c09163a..a9abd0307 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -399,7 +399,7 @@ ActiveRecord::Schema.define(version: 2022_12_12_061802) do t.datetime "agent_last_seen_at" t.jsonb "additional_attributes", default: {} t.bigint "contact_inbox_id" - t.uuid "uuid", default: -> { "public.gen_random_uuid()" }, null: false + t.uuid "uuid", default: -> { "gen_random_uuid()" }, null: false t.string "identifier" t.datetime "last_activity_at", default: -> { "CURRENT_TIMESTAMP" }, null: false t.bigint "team_id" @@ -849,9 +849,6 @@ ActiveRecord::Schema.define(version: 2022_12_12_061802) do t.jsonb "custom_attributes", default: {} t.string "type" t.text "message_signature" - t.datetime "locked_at" - t.integer "failed_attempts" - t.string "unlock_token" t.index ["email"], name: "index_users_on_email" t.index ["pubsub_token"], name: "index_users_on_pubsub_token", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true