You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
I think this should be implemented by hiding the N "conflicting" methods from the end-user and creating a unique method.
While most of the methods are automatically generated, I'd say this should be done manually as it requires human touch to choose how to structure and where to locate the API.
For this example, I think it would be nice to completely hide channels.GetMessages and have both methods under the messages namespace as it sounds the least specialized between the two. Do you agree?
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.
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?
The text was updated successfully, but these errors were encountered: