UpdateShortMessage.UpdateList correctly handle Flags.out_

This commit is contained in:
Wizou 2022-05-13 23:16:48 +02:00
parent 5465474505
commit 9753b2b385
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
contact_links:
- name: You have a question about the Telegram API or how to do something with WTelegramClient?
url: https://stackoverflow.com/questions/ask?tags=wtelegramclient+telegram-api
url: https://stackoverflow.com/questions/ask?tags=c%23+wtelegramclient+telegram-api
about: The answer to your question can be helpful to the community so it's better to ask them on StackOverflow --->

View file

@ -343,9 +343,9 @@ namespace TL
{
message = new Message
{
flags = (Message.Flags)flags | Message.Flags.has_from_id, id = id, date = date,
flags = (Message.Flags)flags | (flags.HasFlag(Flags.out_) ? 0 : Message.Flags.has_from_id), id = id, date = date,
message = message, entities = entities, reply_to = reply_to,
from_id = new PeerUser { user_id = user_id },
from_id = flags.HasFlag(Flags.out_) ? null : new PeerUser { user_id = user_id },
peer_id = new PeerUser { user_id = user_id },
fwd_from = fwd_from, via_bot_id = via_bot_id, ttl_period = ttl_period
}, pts = pts, pts_count = pts_count