getPeerType function
Returns the dialog type.
Accepts the id
parameter as input,
if id
is less than peerChatIdOffset, MessageSource.chat is returned,
if id
is less than zero, returned MessageSource.group,
in all other cases MessageSource.user
Implementation
MessageSource getPeerType(int id) {
if (peerChatIdOffset < id) {
return MessageSource.chat;
}
if (id < 0) {
return MessageSource.group;
}
return MessageSource.user;
}