Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Dec 12, 2024
1 parent 724d0c4 commit e13b6b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main/src/models/Pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class Pair {
const lastHash = avatarCache ? avatarCache.hash : null;
const avatar = await getAvatar(this.qqRoomId);
const newHash = md5(avatar);
if (!lastHash || lastHash.compare(newHash) !== 0) {
if (!lastHash || Buffer.from(lastHash).compare(newHash) !== 0) {
log.debug(`更新群头像: ${this.qqRoomId}`);
await this._tg.setProfilePhoto(avatar);
await db.avatarCache.upsert({
Expand Down
2 changes: 1 addition & 1 deletion main/src/models/TelegramSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class TelegramSession extends MemorySession {

if (authKey && typeof authKey === 'object') {
this._authKey = new AuthKey();
await this._authKey.setKey(authKey);
await this._authKey.setKey(Buffer.from(authKey));
}
if (dcId) {
this._dcId = dcId;
Expand Down

0 comments on commit e13b6b3

Please sign in to comment.