Skip to content

Commit

Permalink
group id change to minus
Browse files Browse the repository at this point in the history
  • Loading branch information
banghasan committed Sep 6, 2021
1 parent b239756 commit cc69fc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions core/duamessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ class DuaMessage {
channelStore(data) {
let id = data.id;
let type = data.className.toLowerCase();
if (type == 'channel') id = Number('-100' + id);
// if (type == 'channel') id = Number('-100' + id);
let channel = {
id,
id: type == 'channel' ? Number('-100' + id) : Number('-' + id),
type,
first_name: data.firstName,
last_name: data.lastName,
Expand Down Expand Up @@ -240,8 +240,9 @@ class DuaMessage {
get context() {
this.store();

// console.log('==> Messages:', this.update.messages, '\n===END');
// console.log('==> ISI STORE', this.Store);

let broadcast = [];
let messages = this.update.messages;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "duagram",
"version": "1.3.5",
"version": "1.3.6",
"description": "Telegram Framework for userbot or bot api",
"main": "index.js",
"homepage": "https://t.me/duagram",
Expand Down
4 changes: 4 additions & 0 deletions utils/peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ module.exports = (ctx, event = 'none') => {
return ctx;
}

if (ctx.chat && ctx.chat.id) {
return ctx.chat.id;
}

if (ctx.peerId) {
let peer = fieldType(ctx.peerId);
return peer.id;
Expand Down

0 comments on commit cc69fc8

Please sign in to comment.