Package org.drinkless.tdlib

# Class TdApi.NewChatPrivacySettings

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.NewChatPrivacySettings

Enclosing class:
  `TdApi`

public static class TdApi.NewChatPrivacySettings extends TdApi.Object
Contains privacy settings for chats with non-contacts.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `boolean`
  `allowNewChatsFromUnknownUsers`
  True, if non-contacts users are able to write first to the current user.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `long`
  `incomingPaidMessageStarCount`
  Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption("paid_message_star_count_max").

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NewChatPrivacySettings()`
  Contains privacy settings for chats with non-contacts.
  `NewChatPrivacySettings(boolean allowNewChatsFromUnknownUsers, long incomingPaidMessageStarCount)`
  Contains privacy settings for chats with non-contacts.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### allowNewChatsFromUnknownUsers

    public boolean allowNewChatsFromUnknownUsers
    True, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting.

  - ### incomingPaidMessageStarCount

    public long incomingPaidMessageStarCount
    Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption("paid_message_star_count_max"). If positive, then allowNewChatsFromUnknownUsers must be true. The current user will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending. Can be positive, only if getOption("can_enable_paid_messages") is true.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### NewChatPrivacySettings

    public NewChatPrivacySettings()
    Contains privacy settings for chats with non-contacts.

  - ### NewChatPrivacySettings

    public NewChatPrivacySettings(boolean allowNewChatsFromUnknownUsers, long incomingPaidMessageStarCount)
    Contains privacy settings for chats with non-contacts.
    Parameters:
      `allowNewChatsFromUnknownUsers` - True, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting.
      `incomingPaidMessageStarCount` - Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption("paid_message_star_count_max"). If positive, then allowNewChatsFromUnknownUsers must be true. The current user will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending. Can be positive, only if getOption("can_enable_paid_messages") is true.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Object`
    Returns:
      this.CONSTRUCTOR