Closed luskbo closed 4 years ago
Just came across an error in the documentation.
Under the section : "Updating the “last_seen” timestamp", there is an if statement for checking the heartbeat string.
from channels_presence.models import Presence def ws_receive(message): ... if message.content('text') == '"heartbeat"': Presence.objects.touch(message.reply_channel.name)
Possibly a typo, but this generates a callable error. The correction is to just to change out the parentheses for brackets like this:
from channels_presence.models import Presence def ws_receive(message): ... if message.content['text'] == '"heartbeat"': Presence.objects.touch(message.reply_channel.name)
Just came across an error in the documentation.
Under the section : "Updating the “last_seen” timestamp", there is an if statement for checking the heartbeat string.
Possibly a typo, but this generates a callable error. The correction is to just to change out the parentheses for brackets like this: