@vlprojects-chat/chat 0.33.3 → 0.33.4-lk-7592-fix-polls.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -7
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -60230,7 +60230,7 @@ const ode = (e) => {
60230
60230
  /* @__PURE__ */ h.jsx(Ea, { onBack: () => e.back(), children: /* @__PURE__ */ h.jsx(oi, { children: /* @__PURE__ */ h.jsx(Te, { id: "userList" }) }) }),
60231
60231
  /* @__PURE__ */ h.jsx(kde, { users: n })
60232
60232
  ] });
60233
- }, BA = at(Nde), jde = "@vlprojects-chat/chat", Mde = "vlprojects", Dde = "0.33.3-release-notify-sounds-26201.1", Lde = "vlprojects chat", Bde = "ISC", Fde = "dist/index.d.ts", Vde = "./dist/index.mjs", _de = "./dist/index.mjs", Ude = [
60233
+ }, BA = at(Nde), jde = "@vlprojects-chat/chat", Mde = "vlprojects", Dde = "0.33.3", Lde = "vlprojects chat", Bde = "ISC", Fde = "dist/index.d.ts", Vde = "./dist/index.mjs", _de = "./dist/index.mjs", Ude = [
60234
60234
  "dist"
60235
60235
  ], Wde = {
60236
60236
  type: "git",
@@ -60826,7 +60826,7 @@ class cp {
60826
60826
  }
60827
60827
  async getPolls() {
60828
60828
  const { root: t } = this.params;
60829
- return t.currentChannel ? await uk(t.currentChannel.id) || null : (we.warn("PollsController: No current channel", { case: "getPolls()" }), null);
60829
+ return t.initialChannel ? await uk(t.initialChannel.id) || null : (we.warn("PollsController: No current channel", { case: "getPolls()" }), null);
60830
60830
  }
60831
60831
  getChatUserInfo() {
60832
60832
  if (!this.params.root.auth.me)
@@ -60839,11 +60839,11 @@ class cp {
60839
60839
  }
60840
60840
  async getCurrentPoll() {
60841
60841
  const { root: t } = this.params;
60842
- if (!t.currentChannel)
60842
+ if (!t.initialChannel)
60843
60843
  return we.warn("PollsController: No current channel", { case: "getCurrentPoll()" }), null;
60844
60844
  try {
60845
60845
  const n = await Xo("polls/current", {
60846
- channelId: Number(t.currentChannel.id),
60846
+ channelId: Number(t.initialChannel.id),
60847
60847
  includeAnswered: !0
60848
60848
  });
60849
60849
  return (n == null ? void 0 : n[0]) || null;
@@ -60857,13 +60857,13 @@ class cp {
60857
60857
  async createPoll(t) {
60858
60858
  var r;
60859
60859
  const { root: n } = this.params;
60860
- if (!((r = n.currentChannel) != null && r.id))
60860
+ if (!((r = n.initialChannel) != null && r.id))
60861
60861
  return we.warn("PollsController: No current channel", { case: "createPoll()" }), null;
60862
60862
  try {
60863
60863
  const o = {
60864
60864
  ...t
60865
60865
  };
60866
- return await zj(o, Number(n.currentChannel.id));
60866
+ return await zj(o, Number(n.initialChannel.id));
60867
60867
  } catch (o) {
60868
60868
  return we.error("PollsController: Failed to create poll", { case: "createPoll", error: o }), null;
60869
60869
  }
@@ -60895,7 +60895,7 @@ class cp {
60895
60895
  }
60896
60896
  async sendPollAnswer(t) {
60897
60897
  var r;
60898
- const n = (r = this.params.root.currentChannel) == null ? void 0 : r.activePoll;
60898
+ const n = (r = this.params.root.initialChannel) == null ? void 0 : r.activePoll;
60899
60899
  if (!n)
60900
60900
  return we.warn("PollsController: No active poll", { case: "sendPollAnswer()" }), !1;
60901
60901
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vlprojects-chat/chat",
3
3
  "author": "vlprojects",
4
- "version": "0.33.3",
4
+ "version": "0.33.4-lk-7592-fix-polls.1",
5
5
  "description": "vlprojects chat",
6
6
  "license": "ISC",
7
7
  "types": "dist/index.d.ts",