# Following Users is not working

**URL:** <https://forum.heroiclabs.com/t/following-users-is-not-working/6516>\
**Category:** Client Libraries\
**Tags:** sdk-defold\
**Created:** [February 23, 2026, 8:25pm UTC](https://forum.heroiclabs.com/t/following-users-is-not-working/6516 "2026-02-23T20:25:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SirCez](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@SirCez](https://forum.heroiclabs.com/u/SirCez)\
**Post date:** [February 23, 2026, 8:25pm UTC](https://forum.heroiclabs.com/t/following-users-is-not-working/6516/1 "2026-02-23T20:25:08Z")

</div>

The example given [here](https://heroiclabs.com/docs/nakama/client-libraries/defold/#status--presence) simply does not work.

```auto
socket.on_statuspresence(function(message)
  local pressences = message.on_status_presence

  if pressence then
    -- todo: check if online
    for _, presence in ipairs(presences)
      pprint(presence.username .. " is online with status: '" .. presence.status .. "'")
    end
  end
end)

```

on\_statuspresence() does not exist on socket. I was able to inspect the socket object and use on\_status\_presence\_event() which works.

BUT the following also doesn’t work. There is an assertion error on user\_ids.

```auto
local user_ids = { "<SomeUserId>", "<AnotherUserId>" }
local result = socket.status_follow(user_ids)

```

Upon inspecting the client source:

```auto
function M.status_follow(socket, user_ids, usernames, callback)
	assert(socket)
	assert(user_ids == nil or _G.type(user_ids) == 'string')
	assert(usernames == nil or _G.type(usernames) == 'string')
	socket.cid = socket.cid + 1
	local message = {
		cid = tostring(socket.cid),
		status_follow = {
			user_ids = user_ids,
			usernames = usernames,
		}
	}
	return socket_send(socket, message, callback)
end

```

The user\_ids is expected to be nil or of type string.

Can someone help me figure this out please?

---

<div class="post-metadata">

**Author:** ![trandromeda](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/trandromeda/32/2659_2.png) [@trandromeda](https://forum.heroiclabs.com/u/trandromeda)\
**Post date:** [March 4, 2026, 3:58pm UTC](https://forum.heroiclabs.com/t/following-users-is-not-working/6516/2 "2026-03-04T15:58:42Z")

</div>

Hey @SirCez , thank you for flagging these errors in our documentation and SDK. The way you’ve passed in `user_ids` is correct, we’ll fix the assertion so you can expect that to be patched soon (follow the PR for updates: [Fix status\_follow and status\_unfollow assertions to accept arrays of user IDs by DannyIsYog · Pull Request #91 · heroiclabs/nakama-defold · GitHub](https://github.com/heroiclabs/nakama-defold/pull/91))

As for `on_statuspresence()`, we’ll fix the example in our docs so it uses the right name.

Appreciate your help and patience on this!

---

<div class="post-metadata">

**Author:** ![SirCez](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@SirCez](https://forum.heroiclabs.com/u/SirCez)\
**Post date:** [March 4, 2026, 5:01pm UTC](https://forum.heroiclabs.com/t/following-users-is-not-working/6516/3 "2026-03-04T17:01:32Z")

</div>

Cheers. Thank you for the update and your hard work.
