<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def on_raw_invite(self, message):
 """ INVITE command. """

        nick, metadata = self._parse_user(message.source)
        self._sync_user(nick, metadata)

        target, channel = message.params
        target, metadata = self._parse_user(target)

        if self.is_same_nick(self.nickname, target):
            await self.on_invite(channel, nick)
        else:
            await self.on_user_invite(target, channel, nick)