Widget: Support new "m.widget" state event type but keep using "im.vector.modular.widgets" for operations

while the move is not fully done (https://docs.google.com/document/d/1uPF7XWY_dXTKVKV7jZQ2KmsI19wn9-kFRgQ1tFQP7wQ/edit?usp=sharing)
This commit is contained in:
manuroe
2018-05-07 10:12:02 +02:00
parent ce3f22740f
commit d9d3d1deeb
5 changed files with 35 additions and 17 deletions
+5 -2
View File
@@ -22,9 +22,12 @@
- (instancetype)initWithWidgetEvent:(MXEvent *)widgetEvent inMatrixSession:(MXSession*)mxSession
{
if (![widgetEvent.type isEqualToString:kWidgetEventTypeString])
// TODO - Room widgets need to be moved to 'm.widget' state events
// https://docs.google.com/document/d/1uPF7XWY_dXTKVKV7jZQ2KmsI19wn9-kFRgQ1tFQP7wQ/edit?usp=sharing
if (![widgetEvent.type isEqualToString:kWidgetMatrixEventTypeString]
&& ![widgetEvent.type isEqualToString:kWidgetModularEventTypeString])
{
// The Widget class works only with modular, aka "im.vector.modular.widgets", widgets
// The Widget class works only with modular, aka "m.widget" or "im.vector.modular.widgets", widgets
return nil;
}