rubydium 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubydium/mixins/other_actions.rb +3 -1
- data/lib/rubydium/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c1d20d65d61bd05e2ae6df13ad97e86cb9bad0f3c59a7f00158f446647c54bc
|
4
|
+
data.tar.gz: 9a648c95b7fd214a14e664c276ccf253df28ecd165aedde1eefc6a6ea55c0836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3bd24a3265d25cb6a3452c401b189ad11e51891b6815dbde2d9ab4159a3a82b9b68cb6165fea290922223c2a664137f5bfe27c1ad4bc8ca18f60472cb6e4d0
|
7
|
+
data.tar.gz: 39b50ca278eb0f712f4ba2c4b03b86fdf7b22cb0681bc1d74c5290018793a28949322478c3dd61168b5bdf89595825e6f42f2ddd917045948436683d357ec1b9
|
@@ -3,7 +3,9 @@ module Rubydium
|
|
3
3
|
module OtherActions
|
4
4
|
def safe_delete(maybe_message)
|
5
5
|
message = definitely_message(maybe_message)
|
6
|
-
|
6
|
+
from_bot = message&.from&.id == config.bot_id # also returns if it's nil
|
7
|
+
from_owner = message&.from&.username == config.owner_username
|
8
|
+
return false unless from_bot || from_owner
|
7
9
|
|
8
10
|
safe_delete_by_id(message.message_id)
|
9
11
|
end
|
data/lib/rubydium/version.rb
CHANGED