Skip to content

Read unread message and set them as read or delete them #42

@derodevil

Description

@derodevil

I try your library and it is awesome. It's more stable than other telegram libraries. The features like auto reconnect is very helpful.
I have no idea about sending rpc request to read unread messages and set them as read or delete them. Here's the code I'm using
If I subscribe to the UpdateMessage event then the Flood - FLOOD_WAIT_19 occurs where I have to wait 19 seconds to read next incoming text message. No idea how to read unread message without FLOOD_WAIT :(

to set message as read - no luck

var requestConfirmed = new ReceivedMessagesRequest(messageId)
{
    ConfirmReceived = true
};
await client.SendRpcRequest(requestConfirmed);

to delete message - no luck

var requestDelete = new DeleteMessagesRequest(new List<int> { messageId });
await client.SendRpcRequest(requestDelete);

One more. After creating new instance of TelegramClient and calling client.Start(); the UpdateMessage event is not fired untill I send message first then back to normal (UpdateMessage fired again)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions