Return event_id from room methods that send messages
The "event_id" returned by the HS is returned directly, instead of a lone table with a single "event_id" member, for the following methods: room:send_text() room:send_emote() room:send_notice()
This commit is contained in:
@@ -144,15 +144,18 @@ function Room:_log(fmt, ...)
|
||||
end
|
||||
|
||||
function Room:send_text(text)
|
||||
return self.client._api:send_message(self.room_id, text)
|
||||
-- XXX: How does error handling work here?
|
||||
return self.client._api:send_message(self.room_id, text).event_id
|
||||
end
|
||||
|
||||
function Room:send_emote(text)
|
||||
return self.client._api:send_emote(self.room_id, text)
|
||||
-- XXX: How does error handling work here?
|
||||
return self.client._api:send_emote(self.room_id, text).event_id
|
||||
end
|
||||
|
||||
function Room:send_notice(text)
|
||||
return self.client._api:send_notice(self.room_id, text)
|
||||
-- XXX: How does error handling work here?
|
||||
return self.client._api:send_notice(self.room_id, text).event_id
|
||||
end
|
||||
|
||||
function Room:invite_user(user_id)
|
||||
|
||||
Reference in New Issue
Block a user