processone / xmpp

Erlang/Elixir XMPP parsing and serialization library on top of Fast XML

Home Page:http://process-one.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error while encoding #muc_subscription record

ltAldoRaine opened this issue · comments

I want to return extra attribute when user retrieves subscribed groups.

I added new column in muc_room_subscribers, and changed

?SQL("select @(room)s from muc_room_subscribers where jid=%(JidS)s"
	     " and host=%(Host)s")

with this

?SQL("select @(room)s, @(unread)s from muc_room_subscribers where jid=%(JidS)s"
	     " and host=%(Host)s")

and

[jid:make(Room, Host, <<>>) || {Room} <- Subs];
with this

[#muc_subscription{jid = jid:make(Room, Host, <<>>)), unread = binary_to_integer(Unread)} || {Room, Unread} <- Subs];
Also i changed xmpp_spec file and transfer new p1_mucsub.erl to ejabebrd deps/xmpp/src directory

i think i'm doing everything right, but when i retrieve subscribed groups i get this error.

image

can you help me ?