Skip to content

setNotificationSettings

Sahri Riza Umami edited this page Jun 23, 2018 · 3 revisions

Changes notification settings for a given scope.

setNotificationSettings(scope, chat_id, mute_for, sound, show_preview, callback, data)
Field Type Description
scope string Scope for which to change the notification settings: Chat, PrivateChats, BasicGroupChats and AllChats.
chat_id int53 Chat identifier.
mute_for int32 Time left before notifications will be unmuted, in seconds.
sound string n audio file name for notification sounds; only applies to iOS applications .
show_preview Bool True, if message content should be displayed in notifications.

Example

  • Mute all chats notification in chat 1234567890 for 1 minute.

    setNotificationSettings('AllChats', 1234567890, 60)

    Response:

    {
      ["@type"] = "ok"
    }

Frequently Asked Questions
The Functions

Clone this wiki locally