forked from retoor/snek
fix: await channel_member.get_name() call in notification service to fix missing async
The notification service's `_notify_channel_members` method was calling `channel_member.get_name()` without the `await` keyword, causing a coroutine object to be passed instead of the resolved string value. This resulted in push notifications containing the string representation of the coroutine object rather than the actual channel member name. The fix adds the missing `await` to properly resolve the async method call.
This commit is contained in:
@@ -65,7 +65,7 @@ class NotificationService(BaseService):
|
||||
if channel_member["user_uid"] != user["uid"]:
|
||||
try:
|
||||
stripped_message = strip_markdown(channel_message["message"])
|
||||
channel_name = channel_member.get_name()
|
||||
channel_name = await channel_member.get_name()
|
||||
await self.app.services.push.notify_user(
|
||||
user_uid=channel_member["user_uid"],
|
||||
payload={
|
||||
|
||||
Reference in New Issue
Block a user