XEP-0428: Fallback Indication
This commit is contained in:
		@@ -95,5 +95,6 @@ __all__ = [
 | 
				
			|||||||
    'xep_0405',  # MIX-PAM
 | 
					    'xep_0405',  # MIX-PAM
 | 
				
			||||||
    'xep_0421',  # Anonymous unique occupant identifiers for MUCs
 | 
					    'xep_0421',  # Anonymous unique occupant identifiers for MUCs
 | 
				
			||||||
    'xep_0422',  # Message Fastening
 | 
					    'xep_0422',  # Message Fastening
 | 
				
			||||||
 | 
					    'xep_0428',  # Message Fallback
 | 
				
			||||||
    'xep_0444',  # Message Reactions
 | 
					    'xep_0444',  # Message Reactions
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								slixmpp/plugins/xep_0428/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								slixmpp/plugins/xep_0428/__init__.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					    Slixmpp: The Slick XMPP Library
 | 
				
			||||||
 | 
					    Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net>
 | 
				
			||||||
 | 
					    This file is part of Slixmpp.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    See the file LICENSE for copying permission.
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from slixmpp.plugins.base import register_plugin
 | 
				
			||||||
 | 
					from slixmpp.plugins.xep_0428.stanza import *
 | 
				
			||||||
 | 
					from slixmpp.plugins.xep_0428.fallback import XEP_0428
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					register_plugin(XEP_0428)
 | 
				
			||||||
							
								
								
									
										22
									
								
								slixmpp/plugins/xep_0428/fallback.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								slixmpp/plugins/xep_0428/fallback.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					    Slixmpp: The Slick XMPP Library
 | 
				
			||||||
 | 
					    Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net>
 | 
				
			||||||
 | 
					    This file is part of Slixmpp.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    See the file LICENSE for copying permission.
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					from slixmpp.plugins import BasePlugin
 | 
				
			||||||
 | 
					from slixmpp.plugins.xep_0428 import stanza
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class XEP_0428(BasePlugin):
 | 
				
			||||||
 | 
					    '''XEP-0428: Fallback Indication'''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    name = 'xep_0428'
 | 
				
			||||||
 | 
					    description = 'Fallback Indication'
 | 
				
			||||||
 | 
					    dependencies = set()
 | 
				
			||||||
 | 
					    stanza = stanza
 | 
				
			||||||
 | 
					    namespace = stanza.NS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def plugin_init(self) -> None:
 | 
				
			||||||
 | 
					        stanza.register_plugins()
 | 
				
			||||||
							
								
								
									
										26
									
								
								slixmpp/plugins/xep_0428/stanza.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								slixmpp/plugins/xep_0428/stanza.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					    Slixmpp: The Slick XMPP Library
 | 
				
			||||||
 | 
					    Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net>
 | 
				
			||||||
 | 
					    This file is part of Slixmpp.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    See the file LICENSE for copying permissio
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from slixmpp.stanza import Message
 | 
				
			||||||
 | 
					from slixmpp.xmlstream import (
 | 
				
			||||||
 | 
					    ElementBase,
 | 
				
			||||||
 | 
					    register_stanza_plugin,
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NS = 'urn:xmpp:fallback:0'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class Fallback(ElementBase):
 | 
				
			||||||
 | 
					    namespace = NS
 | 
				
			||||||
 | 
					    name = 'fallback'
 | 
				
			||||||
 | 
					    plugin_attrib = 'fallback'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def register_plugins():
 | 
				
			||||||
 | 
					    register_stanza_plugin(Message, Fallback)
 | 
				
			||||||
		Reference in New Issue
	
	Block a user