Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit ad0a166

Browse files
committed
Add api token as a query parameter to the tipeeestream socket url
1 parent c0ce3e7 commit ad0a166

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/main/scala/org/codeoverflow/chatoverflow/requirement/service/tipeeestream/TipeeestreamConnector.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class TipeeestreamConnector(override val sourceIdentifier: String) extends Event
3535
private def startSocket(): Boolean = {
3636
@volatile var connected: Option[Boolean] = None
3737
val thread = Thread.currentThread
38-
socket = Some(IO.socket(SOCKET_URL).connect())
38+
val url = s"$SOCKET_URL?access_token=${credentials.get.getValue("apiKey").get}"
39+
socket = Some(IO.socket(url).connect())
3940
socket.get.on(Socket.EVENT_CONNECT, (_: Any) => {
4041
logger info "Connected to TipeeeStream Socket.io"
4142
socket.get.emit("join-room", AUTH_OBJECT)

0 commit comments

Comments
 (0)