Skip to content

Commit

Permalink
Merge pull request #5 from erdnaxeli/fixes/missing_fields
Browse files Browse the repository at this point in the history
fix(Responses::Sync): the "invite" field is optional
  • Loading branch information
erdnaxeli authored Jul 23, 2021
2 parents ea7e72f + 45e41f9 commit abb88b9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: caridina
version: 0.10.4
version: 0.10.5

authors:
- Alexandre Morignot <erdnaxeli@cervoi.se>
Expand Down
2 changes: 1 addition & 1 deletion src/caridina.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "./caridina/connection"

module Caridina
VERSION = "0.10.4"
VERSION = "0.10.5"

Log = ::Log.for(self)
end
2 changes: 1 addition & 1 deletion src/caridina/responses/sync.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Caridina::Responses
include JSON::Serializable

getter join : Hash(String, JoinedRoom)
getter invite : Hash(String, InvitedRoom)
getter invite : Hash(String, InvitedRoom)?
end

struct JoinedRoom
Expand Down
2 changes: 1 addition & 1 deletion src/caridina/syncer.cr
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Caridina::Syncer
end
end

rooms.invite.each do |room_id, room|
rooms.invite.try &.each do |room_id, room|
room.invite_state.events.each do |event|
event.room_id = room_id
dispatch(event, Source::InvitedRooms)
Expand Down

0 comments on commit abb88b9

Please sign in to comment.