Skip to content

Make methods related to Channels and Messages more comfortable to use #3

@luckyycode

Description

@luckyycode

Let me describe this simple scenario: I need to get messages from a group or channel. Currently I need to see what type of group I am in. E.g.

var peer = IdTools.FromTdToApi(chatId);

if (peer.Type == PeerType.Channel) {
// call *.CloudChatsApi.Channels.GetMessagesAsync(..)
} else if (peer.Type == PeerType.Group) {
// call *.CloudChatsApi.Messages.GetMessagesAsync(..)
} else {
// and so on
}

And the same thing with DeleteMessages, etc.

Maybe CatraProto should have this built-in to ease life of developers or have a separate .Extensions package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions