AbstractContact.kt 832 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright 2019-2021 Mamoe Technologies and contributors.
  3. *
  4. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
  5. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
  6. *
  7. * https://github.com/mamoe/mirai/blob/dev/LICENSE
  8. */
  9. package net.mamoe.mirai.internal.contact
  10. import net.mamoe.mirai.contact.Contact
  11. import net.mamoe.mirai.internal.QQAndroidBot
  12. import net.mamoe.mirai.utils.childScopeContext
  13. import kotlin.coroutines.CoroutineContext
  14. internal abstract class AbstractContact(
  15. final override val bot: QQAndroidBot,
  16. parentCoroutineContext: CoroutineContext,
  17. ) : Contact {
  18. final override val coroutineContext: CoroutineContext = parentCoroutineContext.childScopeContext()
  19. }