diff --git a/app.py b/app.py
index daab203..3394751 100644
--- a/app.py
+++ b/app.py
@@ -86,12 +86,12 @@ def calc_token(cid, uid):
return RtcTokenBuilder.buildTokenWithUid(C.app_id, C.app_certificate, cid, uid, Role_Attendee, privilegeExpiredTs)
-def calc_rtm_token(name):
+def calc_rtm_token(username):
expireTimeInSeconds = 3600 * 5
currentTimestamp = int(time.time())
privilegeExpiredTs = currentTimestamp + expireTimeInSeconds
- return RtmTokenBuilder.buildToken(C.app_id, C.app_certificate, name, Role_Rtm_User, privilegeExpiredTs)
+ return RtmTokenBuilder.buildToken(C.app_id, C.app_certificate, username, Role_Rtm_User, privilegeExpiredTs)
@app.route('/call/')
@@ -99,7 +99,7 @@ def calc_rtm_token(name):
def homepage():
me = current_user
app_id = C.app_id
- rtm_token = calc_rtm_token(me.acct or me.disp)
+ rtm_token = calc_rtm_token(me.acct)
_cid = request.args.get('cid')
if _cid and not rds.hexists(RDS_KEY, _cid):
diff --git a/templates/homepage.html b/templates/homepage.html
index a9dc071..14951bb 100644
--- a/templates/homepage.html
+++ b/templates/homepage.html
@@ -103,7 +103,7 @@