INNER CODE UNIT · Python

send_chat_room_typing_notification

zapek/Xeres · scripts/bot/bot.py:252

def send_chat_room_typing_notification(conn, own_id, destination_id, room_id):
	conn.send(destination="/app/chat/room",
	          content_type="application/json",
	          headers={"messageType": "CHAT_ROOM_TYPING_NOTIFICATION",
	                   "destinationId": f"{destination_id}"},
	          body=json.dumps({"roomId": room_id,
	                           "senderNickname": PROFILE_NAME,
	                           "gxsId": {"bytes": f"{own_id['gxsId']['bytes']}"},
	                           "content": ""})
	          )


def send_private_typing_notification(conn, destination_id):
	conn.send(destination="/app/chat/private",
	          content_type="application/json",
	          headers={"messageType": "CHAT_TYPING_NOTIFICATION",
	                   "destinationId": f"{destination_id}"},
	          body=json.dumps({"content": ""})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…