@tgsnake/core
Version:
Pure Telegram MTProto library for nodejs
31 lines (30 loc) • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlreadyAccepted = exports.ChatNotFound = exports.FingerprintMismatch = exports.SecretChatError = void 0;
const Base_js_1 = require("./Base.js");
class SecretChatError extends Base_js_1.BaseError {
constructor(message, description) {
super();
this.message = message;
this.description = description;
}
}
exports.SecretChatError = SecretChatError;
class FingerprintMismatch extends SecretChatError {
constructor() {
super('Fingerprint key mismatch', 'Given fingerprint key from message is mismatch. So the message is not secure and the secret chat should be closed.');
}
}
exports.FingerprintMismatch = FingerprintMismatch;
class ChatNotFound extends SecretChatError {
constructor(chatId) {
super('Secret chat not found', `Provided chatId (${chatId}) is not found in session. Make sure the chatId is correct and already saved in session.`);
}
}
exports.ChatNotFound = ChatNotFound;
class AlreadyAccepted extends SecretChatError {
constructor() {
super('Secret chat already accepted');
}
}
exports.AlreadyAccepted = AlreadyAccepted;