feat: emoji reactions for tasks and comments (#2196)
This PR adds reactions for tasks and comments, similar to what you can do on Gitea, GitHub, Slack and plenty of other tools. Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2196 Co-authored-by: kolaente <k@knt.li> Co-committed-by: kolaente <k@knt.li>
This commit is contained in:
11
pkg/db/db.go
11
pkg/db/db.go
@ -26,6 +26,8 @@ import (
|
||||
|
||||
"code.vikunja.io/api/pkg/config"
|
||||
"code.vikunja.io/api/pkg/log"
|
||||
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/names"
|
||||
"xorm.io/xorm/schemas"
|
||||
@ -227,3 +229,12 @@ func NewSession() *xorm.Session {
|
||||
func Type() schemas.DBType {
|
||||
return x.Dialect().URI().DBType
|
||||
}
|
||||
|
||||
func GetDialect() string {
|
||||
dialect := config.DatabaseType.GetString()
|
||||
if dialect == "sqlite" {
|
||||
dialect = builder.SQLITE
|
||||
}
|
||||
|
||||
return dialect
|
||||
}
|
||||
|
6
pkg/db/fixtures/reactions.yml
Normal file
6
pkg/db/fixtures/reactions.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- id: 1
|
||||
user_id: 1
|
||||
entity_id: 1
|
||||
entity_kind: 0
|
||||
value: '👋'
|
||||
created: 2024-03-12 15:00:00
|
@ -100,3 +100,9 @@
|
||||
task_id: 35
|
||||
created: 2020-02-19 18:07:06
|
||||
updated: 2020-02-19 18:07:06
|
||||
- id: 18
|
||||
comment: comment 18
|
||||
author_id: 13
|
||||
task_id: 34
|
||||
created: 2020-02-19 18:07:06
|
||||
updated: 2020-02-19 18:07:06
|
||||
|
Reference in New Issue
Block a user