public GalleryUserProfilePhotoItem(IProtoService protoService, Telegram.Td.Api.User user, UserProfilePhoto photo, string caption)
     : base(protoService)
 {
     _user    = user;
     _photo   = photo;
     _caption = caption;
 }
Exemple #2
0
        /// <summary>
        /// Adds a user in specified super group
        /// </summary>
        /// <param name="user">target user tdapi.User instnace</param>
        /// <param name="target">target group tdapi.Chat instnace</param>
        /// <param name="addall">if true, user will be added even if its blocked, or last seen long time ago</param>
        public async Task <(enums.Response response, object obj)> AddChatMember(tdapi.User user, tdapi.Chat target, bool addall = false)
        {
            enums.Response res = new enums.Response();
            object         obj = null;

            if (user.Username is null || user.Username.Length <= 0)
            {
                res = enums.Response.Failed;
                obj = new tdapi.Error()
                {
                    Message = "User username cannot be empty"
                };
            }
 public GalleryProfilePhotoItem(IProtoService protoService, Telegram.Td.Api.User user)
     : base(protoService)
 {
     _user  = user;
     _photo = user.ProfilePhoto;
 }