mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Chat: Remove legacy event id checks
This commit is contained in:
parent
0617104f59
commit
228988ffb8
@ -25,8 +25,6 @@ from indico_chat.util import is_chat_admin
|
||||
|
||||
|
||||
class RHChatManageEventBase(RHConferenceModifBase):
|
||||
ALLOW_LEGACY_IDS = False
|
||||
|
||||
def _checkParams(self, params):
|
||||
RHConferenceModifBase._checkParams(self, params)
|
||||
self.event_id = int(self._conf.id)
|
||||
|
||||
@ -27,8 +27,6 @@ from indico_chat.views import WPChatEventPage
|
||||
class RHChatEventPage(RHConferenceBaseDisplay):
|
||||
"""Lists the public chatrooms in a conference"""
|
||||
|
||||
ALLOW_LEGACY_IDS = False
|
||||
|
||||
def _process(self):
|
||||
chatrooms = ChatroomEventAssociation.find_for_event(self._conf).all()
|
||||
cols = set()
|
||||
|
||||
@ -113,8 +113,6 @@ class ChatPlugin(IndicoPlugin):
|
||||
self.register_js_bundle('chat_js', 'js/chat.js')
|
||||
|
||||
def inject_event_header(self, event, **kwargs):
|
||||
if event.has_legacy_id:
|
||||
return ''
|
||||
chatrooms = ChatroomEventAssociation.find_for_event(event).all()
|
||||
if not chatrooms:
|
||||
return ''
|
||||
@ -150,8 +148,6 @@ class ChatPlugin(IndicoPlugin):
|
||||
return url_for_plugin('chat.manage_rooms', event)
|
||||
|
||||
def event_deleted(self, event, **kwargs):
|
||||
if event.has_legacy_id:
|
||||
return
|
||||
for event_chatroom in ChatroomEventAssociation.find_for_event(event, include_hidden=True):
|
||||
chatroom_deleted = event_chatroom.delete()
|
||||
notify_deleted(event_chatroom.chatroom, event, None, chatroom_deleted)
|
||||
@ -162,8 +158,7 @@ class ChatPlugin(IndicoPlugin):
|
||||
|
||||
class ChatroomCloner(EventCloner):
|
||||
def get_options(self):
|
||||
enabled = (not self.event.has_legacy_id and
|
||||
bool(ChatroomEventAssociation.find_for_event(self.event, include_hidden=True).count()))
|
||||
enabled = bool(ChatroomEventAssociation.find_for_event(self.event, include_hidden=True).count())
|
||||
return {'chatrooms': (_('Chatrooms'), enabled, False)}
|
||||
|
||||
def clone(self, new_event, options):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user