message: only replace suffixes if they're actually suffixes
diff: @@ -8,6 +8,7 @@ import yaml
  import urllib
  import requests
  import time
  +import re
  # import logging
  # import httplib as http_client
  @@ -40,7 +41,7 @@ def get_rooms(homeserver, token):
  return room_ids
  def migrate_displayname(uid, oldname, suffix, homeserver, token):
  - newname = oldname.replace(suffix, "")
  + newname = re.sub(re.escape(suffix)+'$', "", oldname)
  print("Migrating %s from %s to %s" % (uid, oldname, newname))
  headers = { 'Content-Type': 'application/json' }
  res = requests.put(homeserver + "/_matrix/client/r0/profile/" + urllib.quote(uid) + "/displayname?access_token=" + token + "&user_id=" + urllib.quote(uid),
  