rubydium 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/rubydium/bot.rb +4 -3
 - data/lib/rubydium/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz: ' 
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 15d0ee09b07faa8d70f6c00989d84eae50a5c858542a2482eaeaa32a70bf45e1
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: '020480b4b46a7f1922ba64ea3f50ed7d5aaeb9727a192a02f93f465065e2dd76'
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 44feadf24157c2d1062926da61d61f2bfa9d2528bba48fda277c4486442a1690d173d18ff96fea802a1dc032d858307e3e1a045a54009e0a1b3102e344fda7a9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c2ff0f1025e03c928ccdb01535a9b2ddbef70f8b88807a95d0a57b8a988f763a88e344905e922a70b52fb43d8bec44ea48c68d6c5832766c11632965e18c9ec9
         
     | 
    
        data/lib/rubydium/bot.rb
    CHANGED
    
    | 
         @@ -25,7 +25,7 @@ module Rubydium 
     | 
|
| 
       25 
25 
     | 
    
         
             
                          # Not all `update`s here are messages (`listen` yields `Update#current_message`,
         
     | 
| 
       26 
26 
     | 
    
         
             
                          # which can be `ChatMemberUpdated` etc.)
         
     | 
| 
       27 
27 
     | 
    
         
             
                          # TODO: rework to allow for clean handling of other types.
         
     | 
| 
       28 
     | 
    
         
            -
                          if update.is_a? Telegram::Bot::Types:: 
     | 
| 
      
 28 
     | 
    
         
            +
                          if update.is_a?(Telegram::Bot::Types::Message) || update.is_a?(Telegram::Bot::Types::CallbackQuery)
         
     | 
| 
       29 
29 
     | 
    
         
             
                            new(client, update).handle_update
         
     | 
| 
       30 
30 
     | 
    
         
             
                          end
         
     | 
| 
       31 
31 
     | 
    
         
             
                        rescue StandardError => e
         
     | 
| 
         @@ -37,10 +37,11 @@ module Rubydium 
     | 
|
| 
       37 
37 
     | 
    
         
             
                end
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
                def initialize(client, update)
         
     | 
| 
      
 40 
     | 
    
         
            +
                  @update = update
         
     | 
| 
       40 
41 
     | 
    
         
             
                  @client = client
         
     | 
| 
       41 
42 
     | 
    
         
             
                  @api = client.api
         
     | 
| 
       42 
     | 
    
         
            -
                  @msg = update
         
     | 
| 
       43 
     | 
    
         
            -
                  @user =  
     | 
| 
      
 43 
     | 
    
         
            +
                  @msg = update.is_a?(Telegram::Bot::Types::Message) ? update : update.message
         
     | 
| 
      
 44 
     | 
    
         
            +
                  @user = update.from
         
     | 
| 
       44 
45 
     | 
    
         
             
                  @chat = @msg.chat
         
     | 
| 
       45 
46 
     | 
    
         
             
                  @topic_id = @msg.message_thread_id if @chat.is_forum
         
     | 
| 
       46 
47 
     | 
    
         
             
                  @replies_to = @msg.reply_to_message unless @msg.reply_to_message&.message_id == @topic_id
         
     | 
    
        data/lib/rubydium/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rubydium
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - bulgakke
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2024-06 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-07-06 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: telegram-bot-ruby
         
     |