summaryrefslogtreecommitdiff
path: root/wsmsg_hello.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wsmsg_hello.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/wsmsg_hello.go b/wsmsg_hello.go
index 8ed03d8..02e8ac1 100644
--- a/wsmsg_hello.go
+++ b/wsmsg_hello.go
@@ -66,7 +66,18 @@ func messageHello(
return wrapError(errCannotSend, err)
}
}
- err = writeText(ctx, c, "HI :"+strings.Join(courseIDs, ","))
+
+ confirmed, err := getConfirmedStatus(ctx, userID)
+ if err != nil {
+ return err
+ }
+ var confirmedString string
+ if confirmed {
+ confirmedString = "1"
+ } else {
+ confirmedString = "0"
+ }
+ err = writeText(ctx, c, "HI "+confirmedString+" :"+strings.Join(courseIDs, ","))
if err != nil {
return wrapError(errCannotSend, err)
}