Skip to content

Commit

Permalink
Send stable buffer ID as a string
Browse files Browse the repository at this point in the history
expo-notifications will JSON.parse the data, returning a number that may
not correctly represent the stable ID if it's too large.
  • Loading branch information
mhoran committed Dec 12, 2024
1 parent 2931ab9 commit d343e66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/weechatrn.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def priv_msg_cb(
send_push(
f"Private message from {prefix}",
body,
{"bufferId": buffer_id, "lineId": line_id},
{"bufferId": str(buffer_id), "lineId": line_id},
)
elif int(highlight):
buffer_name = weechat.buffer_get_string(
Expand All @@ -113,7 +113,7 @@ def priv_msg_cb(
send_push(
f"Highlight in {buffer_name}",
body,
{"bufferId": buffer_id, "lineId": line_id},
{"bufferId": str(buffer_id), "lineId": line_id},
)

return weechat.WEECHAT_RC_OK
Expand Down Expand Up @@ -185,7 +185,7 @@ def main():
if weechat.register(
"WeechatRN",
"mhoran",
"1.3.0",
"1.3.1",
"MIT",
"WeechatRN push notification plugin",
"",
Expand Down

0 comments on commit d343e66

Please sign in to comment.