diff --git a/FAQ.md b/FAQ.md
index a0af502..e50e022 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -47,7 +47,7 @@ You can download such full example apps [for WinForms](https://github.com/wiz0u/
#### 4. Where to get the access_hash? Why the error `CHANNEL_INVALID` or `USER_ID_INVALID`?
-An `access_hash` is required by Telegram when dealing with a channel, user, photo, document, etc...
+Having only the ID is **not enough**: An `access_hash` is required by Telegram when dealing with a channel, user, photo, document, etc...
This serves as a proof that the logged-in user is entitled to access it (otherwise, anybody with the ID could access it)
> A small private `Chat` don't need an access_hash and can be queried using their `chat_id` only.
diff --git a/src/TL.Extensions.cs b/src/TL.Extensions.cs
index 05731d5..1ceae5b 100644
--- a/src/TL.Extensions.cs
+++ b/src/TL.Extensions.cs
@@ -363,8 +363,8 @@ namespace TL
switch (sb[i])
{
case '&': sb.Insert(i + 1, "amp;"); i += 4; break;
- case '<': sb.Remove(i, 1).Insert(i, "<"); i += 3; break;
- case '>': sb.Remove(i, 1).Insert(i, ">"); i += 3; break;
+ case '<': sb.Insert(i, "<"); sb[i += 3] = ';'; break;
+ case '>': sb.Insert(i, ">"); sb[i += 3] = ';'; break;
}
}
return sb.ToString();
diff --git a/src/TL.Helpers.cs b/src/TL.Helpers.cs
index 843b666..507a5fa 100644
--- a/src/TL.Helpers.cs
+++ b/src/TL.Helpers.cs
@@ -209,17 +209,18 @@ namespace TL
partial class ChatParticipants { public override ChatParticipantBase[] Participants => participants; }
partial class MessageMedia { ///Use this helper method to send a copy of the media without downloading it
- ///Quiz poll may need to be voted before obtaining the correct answers. Dice will not replicate same value.
May return for Invoice and other unsupported media types
+ ///Quiz poll may need to be voted before obtaining the correct answers. Dice will not replicate same value. TTL ignored
May return for Invoice and other unsupported media types
public virtual InputMedia ToInputMedia() => null; }
partial class MessageMediaPhoto { public override InputMedia ToInputMedia() => new InputMediaPhoto { id = photo }; }
partial class MessageMediaGeo { public override InputMedia ToInputMedia() => new InputMediaGeoPoint { geo_point = geo }; }
- partial class MessageMediaContact { public override InputMedia ToInputMedia() => new InputMediaContact { first_name = first_name, last_name = last_name, phone_number = phone_number, vcard = vcard }; }
+ partial class MessageMediaContact { public override InputMedia ToInputMedia() => new InputMediaContact { phone_number = phone_number, first_name = first_name, last_name = last_name, vcard = vcard }; }
partial class MessageMediaDocument { public override InputMedia ToInputMedia() => new InputMediaDocument { id = document }; }
partial class MessageMediaVenue { public override InputMedia ToInputMedia() => new InputMediaVenue { geo_point = geo, title = title, address = address, provider = provider, venue_id = venue_id, venue_type = venue_type }; }
partial class MessageMediaGame { public override InputMedia ToInputMedia() => new InputMediaGame { id = game }; }
partial class MessageMediaGeoLive { public override InputMedia ToInputMedia() => new InputMediaGeoLive { geo_point = geo, heading = heading, period = period, proximity_notification_radius = proximity_notification_radius,
flags = (period != 0 ? InputMediaGeoLive.Flags.has_period : 0) | (flags.HasFlag(Flags.has_heading) ? InputMediaGeoLive.Flags.has_heading : 0) | (flags.HasFlag(Flags.has_proximity_notification_radius) ? InputMediaGeoLive.Flags.has_proximity_notification_radius : 0) }; }
- partial class MessageMediaPoll { public override InputMedia ToInputMedia() => new InputMediaPoll { poll = poll, correct_answers = results.results?.Where(pav => pav.flags.HasFlag(PollAnswerVoters.Flags.correct)).Select(pav => pav.option).ToArray(), solution = results.solution, solution_entities = results.solution_entities,
+ partial class MessageMediaPoll { public override InputMedia ToInputMedia() => new InputMediaPoll { poll = poll, solution = results.solution, solution_entities = results.solution_entities,
+ correct_answers = results.results?.Where(pav => pav.flags.HasFlag(PollAnswerVoters.Flags.correct)).Select(pav => pav.option).ToArray(),
flags = (results.results != null ? InputMediaPoll.Flags.has_correct_answers : 0) | (results.solution != null ? InputMediaPoll.Flags.has_solution : 0) }; }
partial class MessageMediaDice { public override InputMedia ToInputMedia() => new InputMediaDice { emoticon = emoticon }; }
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 8b1d2a6..e8697b4 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -1974,7 +1974,7 @@ namespace TL
public string currency;
/// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long total_amount;
- /// An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »
+ /// An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »
[IfFlag(0)] public string invoice_slug;
[Flags] public enum Flags : uint
@@ -2501,9 +2501,9 @@ namespace TL
{
/// Flags, see TL conditional fields
public Flags flags;
- /// Display text in notifications
+ /// (Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used.
[IfFlag(0)] public bool show_previews;
- /// Mute peer?
+ /// (Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used.
[IfFlag(1)] public bool silent;
/// Mute all notifications until this date
[IfFlag(2)] public int mute_until;
@@ -4243,7 +4243,7 @@ namespace TL
pending = 0x1,
}
}
- /// Some featured emoji stickers were marked as read See
+ /// Some featured custom emoji stickers were marked as read See
[TLDef(0xFB4C496C)]
public class UpdateReadFeaturedEmojiStickers : Update { }
/// See
@@ -5581,7 +5581,7 @@ namespace TL
[IfFlag(0)] public string title;
/// Performer
[IfFlag(1)] public string performer;
- /// Waveform
+ /// Waveform: consists in a series of bitpacked 5-bit values.
Example implementation: android.
[IfFlag(2)] public byte[] waveform;
[Flags] public enum Flags : uint
@@ -6554,7 +6554,7 @@ namespace TL
[TLDef(0xC8CF05F8, inheritBefore = true)]
public class MessageEntityCustomEmoji : MessageEntity
{
- /// Document ID of the custom emoji, use messages.getCustomEmojiDocuments to fetch the emoji animation and the actual emoji it represents.
+ /// Document ID of the custom emoji, use messages.getCustomEmojiDocuments to fetch the emoji animation and the actual emoji it represents.
public long document_id;
}
@@ -7981,7 +7981,7 @@ namespace TL
/// Stickerset
public override StickerSet Set => set;
}
- /// Stickerset preview with all stickers of the stickerset included.
Currently used only for custom emoji stickersets, to avoid a further call to messages.getStickerSet. See
+ /// Stickerset preview with all stickers of the stickerset included.
Currently used only for custom emoji stickersets, to avoid a further call to messages.getStickerSet. See
[TLDef(0x1AED5EE5)]
public class StickerSetFullCovered : StickerSetCoveredBase
{
@@ -7996,7 +7996,7 @@ namespace TL
public override StickerSet Set => set;
}
- /// Position on a photo where a mask should be placed See
+ /// Position on a photo where a mask should be placed when attaching stickers to media » See
[TLDef(0xAED6DBB2)]
public class MaskCoords : IObject
{
@@ -8004,7 +8004,7 @@ namespace TL
public int n;
/// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)
public double x;
- /// Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)
+ /// Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position)
public double y;
/// Mask scaling coefficient. (For example, 2.0 means a doubled size)
public double zoom;
@@ -10965,7 +10965,7 @@ namespace TL
[Flags] public enum Flags : uint
{
- /// Similar to min objects, used for poll constructors that are the same for all users so they don't have option chosen by the current user (you can use messages.getPollResults to get the full poll results).
+ /// Similar to min objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use messages.getPollResults to get the full poll results).
min = 0x1,
/// Field has a value
has_results = 0x2,
@@ -13305,7 +13305,7 @@ namespace TL
/// Message ID
public int msg_id;
}
- /// An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter » See
+ /// An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter » See
[TLDef(0xC326CAEF)]
public class InputInvoiceSlug : InputInvoice
{
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 3a9a410..04f33ae 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -808,7 +808,7 @@ namespace TL
/// Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID.
/// Theme name
/// Theme file
- /// Theme settings
+ /// Theme settings, multiple values can be provided for the different base themes (day/night mode, etc).
public static Task Account_CreateTheme(this Client client, string slug, string title, InputDocument document = null, InputThemeSettings[] settings = null)
=> client.Invoke(new Account_CreateTheme
{
@@ -1882,7 +1882,7 @@ namespace TL
/// Reorder installed stickersets See
/// Reorder mask stickersets
- /// Reorder custom emoji stickersets
+ /// Reorder custom emoji stickersets
/// New stickerset order by stickerset IDs
public static Task Messages_ReorderStickerSets(this Client client, long[] order, bool masks = false, bool emojis = false)
=> client.Invoke(new Messages_ReorderStickerSets
@@ -2143,8 +2143,8 @@ namespace TL
});
/// Get all archived stickers See
- /// Get mask stickers
- /// Get custom emoji stickers
+ /// Get mask stickers
+ /// Get custom emoji stickers
/// Offsets for pagination, for more info click here
/// Maximum number of results to return, see pagination
public static Task Messages_GetArchivedStickers(this Client client, long offset_id = default, int limit = int.MaxValue, bool masks = false, bool emojis = false)
@@ -2312,7 +2312,7 @@ namespace TL
});
/// Upload a file and associate it to a chat (without actually sending it to the chat) See [bots: ✓] Possible codes: 400,403 (details)
- /// The chat, can be an for bots
+ /// The chat, can be for bots and for users.
/// File uploaded in chunks as described in files »
/// a null value means messageMediaEmpty
public static Task Messages_UploadMedia(this Client client, InputPeer peer, InputMedia media)
@@ -2962,7 +2962,7 @@ namespace TL
emoticon = emoticon,
});
- /// Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ». See Possible codes: 400 (details)
+ /// Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ». See Possible codes: 400 (details)
/// Dialog
/// Message ID
public static Task Messages_GetMessageReadParticipants(this Client client, InputPeer peer, int msg_id)
@@ -3104,7 +3104,7 @@ namespace TL
hash = hash,
});
- /// Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using help.getAppConfig, reactions_default field. See
+ /// Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using help.getAppConfig, reactions_default field. See
/// New emoji reaction
public static Task Messages_SetDefaultReaction(this Client client, Reaction reaction)
=> client.Invoke(new Messages_SetDefaultReaction
@@ -3298,15 +3298,15 @@ namespace TL
good = good,
});
- /// Fetch info about custom emojis. See [bots: ✓]
- /// Custom emoji IDs from a .
+ /// Fetch custom emoji stickers ». See [bots: ✓]
+ /// Custom emoji IDs from a .
public static Task Messages_GetCustomEmojiDocuments(this Client client, long[] document_id)
=> client.Invoke(new Messages_GetCustomEmojiDocuments
{
document_id = document_id,
});
- /// Gets the list of currently installed custom emoji stickersets. See
+ /// Gets the list of currently installed custom emoji stickersets. See
/// Hash for pagination, for more info click here
/// a null value means messages.allStickersNotModified
public static Task Messages_GetEmojiStickers(this Client client, long hash = default)
@@ -3362,7 +3362,7 @@ namespace TL
{
});
- /// Get new updates. See [bots: ✓] Possible codes: 400,403 (details)
+ /// Get new updates. See [bots: ✓] Possible codes: 400,403,500 (details)
/// PTS, see updates.
/// For fast updating: if provided and pts + pts_total_limit < remote pts, will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000
/// date, see updates.
@@ -3588,8 +3588,8 @@ namespace TL
{
});
- /// Get recently used t.me links See
- /// Referer
+ /// Get recently used t.me links. See
+ /// Referrer
public static Task Help_GetRecentMeUrls(this Client client, string referer)
=> client.Invoke(new Help_GetRecentMeUrls
{
@@ -4326,7 +4326,7 @@ namespace TL
purpose = purpose,
});
- /// Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase. See
+ /// Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only. See
/// Payment purpose
public static Task Payments_CanPurchasePremium(this Client client, InputStorePaymentPurpose purpose)
=> client.Invoke(new Payments_CanPurchasePremium
@@ -4340,7 +4340,7 @@ namespace TL
/// Whether this is a video stickerset
/// Stickerset owner
/// Stickerset name, 1-64 chars
- /// Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot_username>". <bot_username> is case insensitive. 1-64 characters.
+ /// Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in "_by_<bot_username>". <bot_username> is case insensitive. 1-64 characters.
/// Thumbnail
/// Stickers
/// Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers
@@ -4686,7 +4686,7 @@ namespace TL
peer = peer,
});
- /// Get an invite link for a group call or livestream See
+ /// Get an invite link for a group call or livestream See Possible codes: 403 (details)
/// For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand).
/// The group call
public static Task Phone_ExportGroupCallInvite(this Client client, InputGroupCall call, bool can_self_unmute = false)