Revert "refactor out _dummy function"

This reverts commit 24a19c8736.
This commit is contained in:
slice 2018-09-01 19:23:13 -07:00
parent 24a19c8736
commit ee6ad56604
No known key found for this signature in database
GPG Key ID: 1508C19D7436A26D
1 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,10 @@ from .enums import ChannelType
from .schemas import USER_MENTION, ROLE_MENTION from .schemas import USER_MENTION, ROLE_MENTION
async def _dummy(any_id):
return str(any_id)
class Storage: class Storage:
"""Class for common SQL statements.""" """Class for common SQL statements."""
def __init__(self, db): def __init__(self, db):
@ -339,9 +343,9 @@ class Storage:
res['mentions'] = await self._msg_regex(USER_MENTION, self.get_user, res['mentions'] = await self._msg_regex(USER_MENTION, self.get_user,
row['content']) row['content'])
# we just return the id as a string, since we don't actually use the role # _dummy just returns the string of the id, since we don't
# objects in mention_roles, just their ids. # actually use the role objects in mention_roles, just their ids.
res['mention_roles'] = await self._msg_regex(ROLE_MENTION, str, res['mention_roles'] = await self._msg_regex(ROLE_MENTION, _dummy,
row['content']) row['content'])
# TODO: handle webhook authors # TODO: handle webhook authors