All Downloads are FREE. Search and download functionalities are using the official Maven repository.

im.actor.server.enrich.RichMessageConfig.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package im.actor.server.enrich

import scala.util.Try

import com.typesafe.config.{ ConfigFactory, Config }

case class RichMessageConfig(maxSize: Long)

object RichMessageConfig {
  def load(config: Config): Try[RichMessageConfig] =
    for {
      maxSize ← Try(config.getBytes("max-preview-size"))
    } yield RichMessageConfig(maxSize)

  def load(): Try[RichMessageConfig] =
    load(ConfigFactory.load().getConfig("modules.enricher"))
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy