diff --git a/docs/comlink_channel.3.scd b/docs/comlink_channel.3.scd index 02b8ff5..0b01a7e 100644 --- a/docs/comlink_channel.3.scd +++ b/docs/comlink_channel.3.scd @@ -19,8 +19,8 @@ comlink_channel - a lua type representing an IRC channel A *channel* represents an IRC channel. *channel:mark_read* - Mark this channel as read. This will set the READMARKER to the time of - the last received message. + Mark this channel as read. This will update the unread indicator to the + position of the last read message. *channel:send_msg* A method on *channel* which accepts a string (_msg_). _Msg_ is sent to diff --git a/src/lua.zig b/src/lua.zig index bb6d624..8d22a41 100644 --- a/src/lua.zig +++ b/src/lua.zig @@ -461,9 +461,7 @@ const Channel = struct { const lua_type = lua.getField(1, "_ptr"); // [table, lightuserdata] lua.argCheck(lua_type == .light_userdata, 2, "expected lightuserdata"); const channel = lua.toUserdata(irc.Channel, 2) catch unreachable; - channel.markRead() catch |err| { - std.log.err("couldn't mark channel as read: {}", .{err}); - }; + channel.last_read_indicator = channel.last_read; lua.pop(2); // [] return 0; }