Show
Ignore:
Timestamp:
08/31/10 03:44:27 (21 months ago)
Author:
winfried
Message:

Integrating CHI post system into WebChatPost? pagees.
Authentication still needs to be done.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • HelpIM3/HelpIM/chat/pages/StartStaffWebChatPost.py

    r987 r1163  
    11import HelpIM.rooms 
    22import HelpIM.chat.pages.StartWebChatBase 
     3import HelpIM.chat.templates.Chat 
    34 
    45class Handler(HelpIM.chat.pages.StartWebChatBase.Handler): 
     
    78 
    89    def getRoom(self): 
     10        # add check for configured cookieDb authentication here 
     11        # and do it ;-) 
     12        # this is a bit of a hack (awaiting for a authentication rewrite) 
     13        # but he, it works 
     14        if not self.posted: 
     15            return None 
    916        rooms = HelpIM.rooms.Rooms(self.site.application.metadata, engine=self.site.database.engine) 
    1017        room = rooms.admitStaff(1) 
     
    1623    def updateConfigs(self): 
    1724        self.configs["NICKNAME"]=self.him_request.requestParameters["NICKNAME"] 
     25        for key in HelpIM.chat.templates.Chat.defaultTranslations: 
     26            if key in self.him_request.requestParameters.keys(): 
     27                self.translations[key] = self.him_request.requestParameters[key] 
    1828        self.configs["ISSTAFF"]=True 
    1929 
    20     def handlePost(self, him_request): 
    21         # accept postdata, missing data will be compensated later on 
    22         him_request.actionResult = None 
    23         return him_request