Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
zo-el committed Nov 9, 2021
1 parent f7c08f2 commit 09e39c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
16 changes: 3 additions & 13 deletions tests/src/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,17 @@ module.exports = async (orchestrator) => {

var sends: any[] = [];
var recvs: any[] = [];
function messageEntry(m) { return m.entry }

let first_message = {
last_seen: { First: null },
channel: channel.entry,
chunk: 0,
entry: {
uuid: uuidv4(),
content: 'x'.repeat(1025),
content: "Hello from alice :)",
}
};

//Send a messages that's too long
try {
await alice_chat.call('chat', 'create_message', first_message);
t.fail()
} catch(e) {
t.deepEqual(e,{ type: 'error', data: { type: 'internal_error', data: 'Source chain error: InvalidCommit error: Message too long' } })
}

first_message.entry.content = "Hello from alice :)";
// Alice send a message
sends.push(first_message);
console.log(sends[0]);
Expand Down Expand Up @@ -115,9 +105,9 @@ module.exports = async (orchestrator) => {
t.deepEqual(sends[3].entry, recvs[3].entry);
await delay(4000)
// Alice lists the messages
alices_view = await alice_chat.call('chat', 'list_messages', { channel: channel.entry, active_chatter: false, target_message_count: 20 })
alices_view = await alice_chat.call('chat', 'list_messages', { channel: channel.entry, active_chatter: false, target_message_count: 2 })
// Bobbo lists the messages
bobbos_view = await bobbo_chat.call('chat', 'list_messages', { channel: channel.entry, active_chatter: false, target_message_count: 10 })
bobbos_view = await bobbo_chat.call('chat', 'list_messages', { channel: channel.entry, active_chatter: false, target_message_count: 2 })
t.deepEqual(alices_view.messages.length, 4)
t.deepEqual(bobbos_view.messages.length, 4)
console.log("ALICE ", alices_view);
Expand Down
2 changes: 1 addition & 1 deletion zomes/chat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["[email protected]", "[email protected]", "[email protected], [email protected]"]
edition = "2018"
name = "elemental-chat"
version = "0.2.0-alpha13"
version = "0.2.1-alpha1"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down

0 comments on commit 09e39c2

Please sign in to comment.