Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

## Added

- `Account.SetUiConfig()`, `Account.GetUiConfig()`, `Bot.SetUiConfig()` and `Bot.GetUiConfig()`
- `Bot.SetUiConfig()` and `Bot.GetUiConfig()`
- new `MsgType`: `MsgVcard`

### Changed

- dependencies: upgrade jrpc2 to version v1.0.0
- dependencies: upgrade jrpc2 to version v1.1.2
- breaking: `EventHandler` and `NewMsgHandler` now have an extra parameter "bot"
- breaking: retrieve events via long polling (added to JSON-RPC server in: https://github.com/deltachat/deltachat-core-rust/pull/4341/)
- breaking: minimum Delta Chat core version required v1.114.0
- breaking: retrieve events via long polling (added to JSON-RPC server in: https://github.com/chatmail/core/pull/4341/)
- breaking: minimum Chatmail core version required: 2.14.0
- breaking: required golang version: 1.25

### Fixed

- fix `Account.SetAvatar()`, allow to discard avatar
- fix `Reactions` type

## v0.17.0

Expand Down
27 changes: 27 additions & 0 deletions deltachat/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,30 @@ func TestChat_Groups(t *testing.T) {
assert.Nil(t, err)
})
}

func TestMsg_Reactions(t *testing.T) {
t.Parallel()
acfactory.WithOnlineAccount(func(rpc *Rpc, accId AccountId) {
chatId, err := rpc.CreateGroupChat(accId, "test group", false)
require.Nil(t, err)

var msgId MsgId
msgId, err = rpc.SendMsg(accId, chatId, MsgData{Text: "test message"})
require.Nil(t, err)

_, err = rpc.SendReaction(accId, msgId, ":)")
require.Nil(t, err)

data, err2 := rpc.GetMessageReactions(accId, msgId)
require.Nil(t, err2)
reactions := data.Unwrap().Reactions
require.Len(t, reactions, 1)
require.Equal(t, reactions[0].Emoji, ":)")

msg, err := rpc.GetMessage(accId, msgId)
require.Nil(t, err)
reactions = msg.Reactions.Reactions
require.Len(t, reactions, 1)
require.Equal(t, reactions[0].Emoji, ":)")
})
}
8 changes: 7 additions & 1 deletion deltachat/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,13 @@ type WebxdcMsgInfo struct {
InternetAccess bool
}

type Reaction struct {
Emoji string
Count uint32
IsFromSelf bool
}

type Reactions struct {
ReactionsByContact map[ContactId][]string
Reactions map[string]int // Unique reactions and their count
Reactions []Reaction
}
2 changes: 1 addition & 1 deletion scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi
if ! command -v deltachat-rpc-server &> /dev/null
then
echo "deltachat-rpc-server not found, installing..."
curl -L https://github.com/deltachat/deltachat-core-rust/releases/latest/download/deltachat-rpc-server-x86_64-linux --output deltachat-rpc-server
curl -L https://github.com/chatmail/core/releases/download/v2.14.0/deltachat-rpc-server-x86_64-linux --output deltachat-rpc-server
chmod +x deltachat-rpc-server
export PATH=`pwd`:"$PATH"
fi
Expand Down
Loading