Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Add option 'notifydel' #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Mirror (latest pull 2020-11-01)
From: https://dev.narayana.im/narayana/zhabogram

## Zhabogram is deprecated now.
Repository is archived.

### Dependencies ###

* Ruby >= 2.4
Expand Down
3 changes: 2 additions & 1 deletion inc/telegramclient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
timezone <timezone> — adjust timezone for Telegram user statuses (example: +02:00)
keeponline <bool> — always keep telegram session online and rely on jabber offline messages (example: true)
rawmessages <bool> — do not add additional info (message id, origin etc.) to incoming messages (example: true)
notifydel <bool> — send info (message id) about deleted messages (example: true)
}

HELP_CHAT_CMD= %q{Available commands:
Expand Down Expand Up @@ -206,7 +207,7 @@ def update_messagecontent(update)
## message(s) deleted
def update_deletemessages(update)
text = "✗ %s" % update.message_ids.join(',')
@xmpp.send_message(@jid, update.chat_id, text) if update.is_permanent
@xmpp.send_message(@jid, update.chat_id, text) if update.is_permanent unless @session[:notifydel] == 'false'
end

## new chat discovered
Expand Down