This commit is contained in:
Mads Marquart
2017-06-03 12:11:18 +02:00
parent 2d90eee939
commit 1f4b0fa150
2 changed files with 6 additions and 6 deletions

View File

@@ -892,11 +892,11 @@ class Client(object):
def fbidStrip(_fbid):
# Stripping of `fbid:` from author_id
if type(_fbid) == int:
return _fbid
if type(_fbid) in [str, unicode] and 'fbid:' in _fbid:
return int(_fbid[5:])
try:
return int(_fbid)
except:
if type(_fbid) in [str, unicode] and 'fbid:' in _fbid:
return int(_fbid[5:])
user_ids = [fbidStrip(uid) for uid in user_ids]