- 
                Notifications
    You must be signed in to change notification settings 
- Fork 414
MSC2772: Notifications for Jitsi Calls #2772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            dbkr
  wants to merge
  2
  commits into
  old_master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
dbkr/msc2772
  
      
      
   
  
    
  
  
  
 
  
      
    base: old_master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            2 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,131 @@ | ||||||||||
| # MSC2772: Notifications for Jitsi Calls | ||||||||||
|  | ||||||||||
| Matrix supports conference calls in rooms througth the use of Jitsi widgets. A user receives | ||||||||||
| notifications when they receive a 1:1 VoIP call, but currently there are no notifications for | ||||||||||
| any widget being added to a room, including Jitsi widgets, so user are not notified when a | ||||||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 
        Suggested change
       
 | ||||||||||
| conference call starts. | ||||||||||
|  | ||||||||||
| ## Proposal | ||||||||||
|  | ||||||||||
| This proposal adds the following predefined rules to the default underride rules: | ||||||||||
| ``` | ||||||||||
| { | ||||||||||
| "rule_id": ".m.jitsi", | ||||||||||
| "default": true, | ||||||||||
| "enabled": true, | ||||||||||
| "conditions": [ | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "type", | ||||||||||
| "pattern": "m.widget", | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "content.type", | ||||||||||
| "pattern": "m.jitsi", | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "state_key", | ||||||||||
| "pattern": "*", | ||||||||||
| }, | ||||||||||
| ], | ||||||||||
| "actions": [ | ||||||||||
| "notify", | ||||||||||
| { | ||||||||||
| "set_tweak": "highlight", | ||||||||||
| "value": False, | ||||||||||
| }, | ||||||||||
| ], | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "rule_id": ".m.jitsi_legacy1", | ||||||||||
| "default": true, | ||||||||||
| "enabled": true, | ||||||||||
| "conditions": [ | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "type", | ||||||||||
| "pattern": "im.vector.modular.widgets", | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "content.type", | ||||||||||
| "pattern": "jitsi", | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "state_key", | ||||||||||
| "pattern": "*", | ||||||||||
| }, | ||||||||||
| ], | ||||||||||
| "actions": [ | ||||||||||
| "notify", | ||||||||||
| { | ||||||||||
| "set_tweak": "highlight", | ||||||||||
| "value": False, | ||||||||||
| }, | ||||||||||
| ], | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "rule_id": ".m.jitsi_legacy2", | ||||||||||
| "default": true, | ||||||||||
| "enabled": true, | ||||||||||
| "conditions": [ | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "type", | ||||||||||
| "pattern": "im.vector.modular.widgets", | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "content.type", | ||||||||||
| "pattern": "m.jitsi", | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "kind": "event_match", | ||||||||||
| "key": "state_key", | ||||||||||
| "pattern": "*", | ||||||||||
| }, | ||||||||||
| ], | ||||||||||
| "actions": [ | ||||||||||
| "notify", | ||||||||||
| { | ||||||||||
| "set_tweak": "highlight", | ||||||||||
| "value": False, | ||||||||||
| }, | ||||||||||
| ], | ||||||||||
| } | ||||||||||
| ``` | ||||||||||
|  | ||||||||||
| The three rules are necessary to cover the three possibilities of `type` and `state_key`: `jitsi` | ||||||||||
| vs `m.jitsi` and `im.vector.modular.widgets` vs `m.widget`. Clients should provide present all three | ||||||||||
| of these rules as single rule to the user and apply the same mdifications to each one of these rule | ||||||||||
| 
      Comment on lines
    
      +102
     to 
      +103
    
   There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 
        Suggested change
       
 | ||||||||||
| IDs (if a rule with that ID was sent by the server). | ||||||||||
|  | ||||||||||
| A future revision to the specification may remove the legacy rules. | ||||||||||
|  | ||||||||||
| ## Potential issues | ||||||||||
|  | ||||||||||
| Having to have three separate rules is nonideal, but a limitation of the current push specification. | ||||||||||
|  | ||||||||||
| ## Alternatives | ||||||||||
|  | ||||||||||
| Extensions could be defined to cause conference calls to 'ring' rather than trigger a standard | ||||||||||
| notification, or the actions could be defined to trigger an audible alert. More advanced conditions | ||||||||||
| could also be defined, for example, varying levels of notification depending on the number of | ||||||||||
| participants in the room. | ||||||||||
|  | ||||||||||
| ## Security considerations | ||||||||||
|  | ||||||||||
| Implementors must ensure to implement the condition checking for a state event, else there would be | ||||||||||
| potential for this to be triggered by user without permission to send state events. | ||||||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 
        Suggested change
       
 | ||||||||||
|  | ||||||||||
| ## Unstable prefix | ||||||||||
| In the unstable stage, the IDs for these rules are: | ||||||||||
| * `.im.vector.jitsi` | ||||||||||
| * `.im.vector.jitsi_legacy1` | ||||||||||
| * `.im.vector.jitsi_legacy2` | ||||||||||
|  | ||||||||||
| Any client implementing support for these rules in the unstable phase should treat the stable and unstable | ||||||||||
| identifiers of each rule as the same rule. | ||||||||||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.