Raw.photos.UploadContactProfilePhoto

Raw.photos.UploadContactProfilePhoto

Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.

photos.uploadContactProfilePhoto#e14c4a71 flags:# suggest:flags.3?true save:flags.4?true user_id:InputUser file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double video_emoji_markup:flags.5?VideoSize = photos.Photo;
export namespace Raw {
  export namespace photos {
    export class UploadContactProfilePhoto {
      constructor(params: {
        suggest?: boolean;
        save?: boolean;
        userId: Raw.TypeInputUser;
        file?: Raw.TypeInputFile;
        video?: Raw.TypeInputFile;
        videoStartTs?: number;
        videoEmojiMarkup?: Raw.TypeVideoSize;
      }) {}
    }
  }
}

This is a function constructor, you can use it as method when call invoke

Layer: 185
Constructor ID: 0xe14c4a71

Property

  • suggest : boolean or undefined

    If set, will send a messageactionsuggestprofilephoto service message to userId, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user).

  • save : boolean or undefined

    If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the messageactionsuggestprofilephoto service message with messages.deletemessages).

  • userId : Raw.TypeInputUser

    The contact

  • file : Raw.TypeInputFile or undefined

    Profile photo

  • video : Raw.TypeInputFile or undefined

    Animated profile picture video

  • videoStartTs : number or undefined

    Floating point unix timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or videoEmojiMarkup is set.

  • videoEmojiMarkup : Raw.TypeVideoSize or undefined

    Animated sticker profile picture, must contain either a videosizeemojimarkup or a videosizestickermarkup constructor.

Results

Raw.photos.TypePhoto