Skip to content

Commit 6585f65

Browse files
committed
Added handler presentation properties
1 parent 8d0d731 commit 6585f65

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fails-components/noteshandler",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "Supplies server side notes handling",
55
"author": "Marten Richter",
66
"license": "AGPL-3.0-or-later",

src/noteshandler.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ export class NotesConnection {
6666
socket.emit('authtoken', { token: token.token })
6767
}
6868

69+
{
70+
const presinfo = this.getPresentationinfo(purenotes)
71+
const readypresinfo = await presinfo
72+
socket.emit('presinfo', readypresinfo)
73+
}
74+
6975
socket.on(
7076
'reauthor',
7177
async function () {
@@ -312,6 +318,29 @@ export class NotesConnection {
312318
)
313319
}
314320

321+
async getPresentationinfo(args) {
322+
const client = this.redis
323+
const hmget = promisify(this.redis.hmget).bind(client)
324+
325+
try {
326+
let lectprop = hmget(
327+
'lecture:' + args.lectureuuid,
328+
'casttoscreens',
329+
'backgroundbw',
330+
'showscreennumber'
331+
)
332+
lectprop = await lectprop
333+
return {
334+
casttoscreens: lectprop[0],
335+
backgroundbw: lectprop[1],
336+
showscreennumber: lectprop[2]
337+
}
338+
} catch (error) {
339+
console.log('getPresentationinfo', error)
340+
return null
341+
}
342+
}
343+
315344
getRoomName(uuid) {
316345
return uuid
317346
}

0 commit comments

Comments
 (0)